Skip to content

taipy.auth.Authorize

Authorized Context Manager.

Available in Taipy Enterprise only

This class exists only in the Enterprise edition of Taipy.

This Context Manager lets you create a block of code executed in an Authorized context: function and method calls that require authorization will find the information in the context.

The general usage of this context is shown in the code below:

from taipy.enterprise.auth import Authorize

# Get Credentials from Authentication
credentials = ...
with Authorize(credentials):
    ...
    # The code in this block can now check for
    # authorization directly from the context
    ...

__init__(credentials)

Initialize a new Authorize context.

Parameters:

Name Type Description Default
credentials Credentials

The user credentials that must be propagated to the code block in this new context.

required