ExtendedUserTokenProvider Class
- Inheritance
-
ExtendedUserTokenProviderExtendedUserTokenProvider
Constructor
ExtendedUserTokenProvider()
Methods
exchange_token |
Performs a token exchange operation such as for single sign-on. |
exchange_token_from_credentials |
Performs a token exchange operation such as for single sign-on. |
get_aad_tokens |
Retrieves Azure Active Directory tokens for particular resources on a configured connection. :param context: :param connection_name: :param resource_urls: :param user_id: :param oauth_app_credentials: :return: |
get_oauth_sign_in_link |
Get the raw signin link to be sent to the user for signin for a connection name. :param context: :param connection_name: :param final_redirect: :param oauth_app_credentials: :return: |
get_sign_in_resource |
Get the raw signin link to be sent to the user for signin for a connection name. |
get_sign_in_resource_from_user |
Get the raw signin link to be sent to the user for signin for a connection name. |
get_sign_in_resource_from_user_and_credentials |
Get the raw signin link to be sent to the user for signin for a connection name. |
get_user_token |
Retrieves the OAuth token for a user that is in a sign-in flow. :param context: :param connection_name: :param magic_code: :param oauth_app_credentials: :return: |
sign_out_user |
Signs the user out with the token server. :param context: :param connection_name: :param user_id: :param oauth_app_credentials: :return: |
exchange_token
Performs a token exchange operation such as for single sign-on.
async exchange_token(turn_context: TurnContext, connection_name: str, user_id: str, exchange_request: TokenExchangeRequest) -> TokenResponse
Parameters
Name | Description |
---|---|
turn_context
Required
|
Context for the current turn of conversation with the user. |
connection_name
Required
|
Name of the auth connection to use. |
user_id
Required
|
The user id associated with the token.. |
exchange_request
Required
|
The exchange request details, either a token to exchange or a uri to exchange. |
Returns
Type | Description |
---|---|
If the task completes, the exchanged token is returned. |
exchange_token_from_credentials
Performs a token exchange operation such as for single sign-on.
async exchange_token_from_credentials(turn_context: TurnContext, oauth_app_credentials: AppCredentials, connection_name: str, user_id: str, exchange_request: TokenExchangeRequest) -> TokenResponse
Parameters
Name | Description |
---|---|
turn_context
Required
|
Context for the current turn of conversation with the user. |
oauth_app_credentials
Required
|
AppCredentials for OAuth. |
connection_name
Required
|
Name of the auth connection to use. |
user_id
Required
|
The user id associated with the token.. |
exchange_request
Required
|
The exchange request details, either a token to exchange or a uri to exchange. |
Returns
Type | Description |
---|---|
If the task completes, the exchanged token is returned. |
get_aad_tokens
Retrieves Azure Active Directory tokens for particular resources on a configured connection. :param context: :param connection_name: :param resource_urls: :param user_id: :param oauth_app_credentials: :return:
async get_aad_tokens(context: TurnContext, connection_name: str, resource_urls: List[str], user_id: str = None, oauth_app_credentials: AppCredentials = None) -> Dict[str, TokenResponse]
Parameters
Name | Description |
---|---|
context
Required
|
|
connection_name
Required
|
|
resource_urls
Required
|
|
user_id
|
default value: None
|
oauth_app_credentials
|
default value: None
|
get_oauth_sign_in_link
Get the raw signin link to be sent to the user for signin for a connection name. :param context: :param connection_name: :param final_redirect: :param oauth_app_credentials: :return:
async get_oauth_sign_in_link(context: TurnContext, connection_name: str, final_redirect: str = None, oauth_app_credentials: AppCredentials = None) -> str
Parameters
Name | Description |
---|---|
context
Required
|
|
connection_name
Required
|
|
final_redirect
|
default value: None
|
oauth_app_credentials
|
default value: None
|
get_sign_in_resource
Get the raw signin link to be sent to the user for signin for a connection name.
async get_sign_in_resource(turn_context: TurnContext, connection_name: str) -> SignInUrlResponse
Parameters
Name | Description |
---|---|
turn_context
Required
|
Context for the current turn of conversation with the user. |
connection_name
Required
|
Name of the auth connection to use. |
Returns
Type | Description |
---|---|
A task that represents the work queued to execute. |
Remarks
If the task completes successfully, the result contains the raw signin link.
get_sign_in_resource_from_user
Get the raw signin link to be sent to the user for signin for a connection name.
async get_sign_in_resource_from_user(turn_context: TurnContext, connection_name: str, user_id: str, final_redirect: str = None) -> SignInUrlResponse
Parameters
Name | Description |
---|---|
turn_context
Required
|
Context for the current turn of conversation with the user. |
connection_name
Required
|
Name of the auth connection to use. |
user_id
Required
|
The user id that will be associated with the token. |
final_redirect
|
The final URL that the OAuth flow will redirect to. default value: None
|
Returns
Type | Description |
---|---|
A task that represents the work queued to execute. |
Remarks
If the task completes successfully, the result contains the raw signin link.
get_sign_in_resource_from_user_and_credentials
Get the raw signin link to be sent to the user for signin for a connection name.
async get_sign_in_resource_from_user_and_credentials(turn_context: TurnContext, oauth_app_credentials: AppCredentials, connection_name: str, user_id: str, final_redirect: str = None) -> SignInUrlResponse
Parameters
Name | Description |
---|---|
turn_context
Required
|
Context for the current turn of conversation with the user. |
oauth_app_credentials
Required
|
Credentials for OAuth. |
connection_name
Required
|
Name of the auth connection to use. |
user_id
Required
|
The user id that will be associated with the token. |
final_redirect
|
The final URL that the OAuth flow will redirect to. default value: None
|
Returns
Type | Description |
---|---|
A task that represents the work queued to execute. |
Remarks
If the task completes successfully, the result contains the raw signin link.
get_user_token
Retrieves the OAuth token for a user that is in a sign-in flow. :param context: :param connection_name: :param magic_code: :param oauth_app_credentials: :return:
async get_user_token(context: TurnContext, connection_name: str, magic_code: str = None, oauth_app_credentials: AppCredentials = None) -> TokenResponse
Parameters
Name | Description |
---|---|
context
Required
|
|
connection_name
Required
|
|
magic_code
|
default value: None
|
oauth_app_credentials
|
default value: None
|
sign_out_user
Signs the user out with the token server. :param context: :param connection_name: :param user_id: :param oauth_app_credentials: :return:
async sign_out_user(context: TurnContext, connection_name: str = None, user_id: str = None, oauth_app_credentials: AppCredentials = None)
Parameters
Name | Description |
---|---|
context
Required
|
|
connection_name
|
default value: None
|
user_id
|
default value: None
|
oauth_app_credentials
|
default value: None
|
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for