Authorize class
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
...
Methods¶
__init__() ¶
__init__(credentials: Credentials) -> None
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 |