IPWorks Auth 2020 Python Edition

Questions / Feedback?

grant_type Property

The grant type defining the authentication flow.

Syntax

def get_grant_type() -> int: ...
def set_grant_type(value: int) -> None: ...

grant_type = property(get_grant_type, set_grant_type)

Default Value

0

Remarks

This property defines the grant type used when performing authentication. The value specified here controls the authentication flow.

Possible values for grant_type are:

  • 0 (Authorization Code - Default)
  • 1 (Implicit)
  • 2 (Hybrid)

When using 0 (Authorization Code Flow - Default) an authorization code is returned from the server_auth_url and the class automatically contacts the server_token_url exchanges the authorization code for an ID token and access token.

When using 1 (Implicit Flow) the server_auth_url returns an ID token and access token directly. This is only recommended for implementations that are in-browser as this potentially exposes the tokens to the end-user and user agent itself.

When using 2 (Hybrid Flow) an authorization code and potentially one or more tokens are returned by the server_auth_url. The class will automatically contact the server_token_url to exchange the authorization code for an ID token and access token.

Additional Notes

The response_type request parameter is automatically set based on the value specified here. In some cases multiple values are acceptable and a default value is chosen automatically. To explicitly specify a response_type value for the chosen grant type set ResponseType after setting this property.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Auth 2020 Python Edition - Version 20.0 [Build 8155]