CSLApplication¶
Qualified name: intranet.apps.oauth.models.CSLApplication
- class intranet.apps.oauth.models.CSLApplication(*args, **kwargs)[source]¶
Bases:
AbstractApplication
Extends the default OAuth Application model to add CSL-specific information about an OAuth application. Disables the implicit, password, and OpenID connect hybrid grant types. Disables use of an OIDC algorithm.
- sanctioned_but_do_not_skip_authorization¶
Whether to not skip the authorization page for this application even if it is sanctioned.
- Type:
- user_has_oauth_and_api_access¶
Whether the user associated with the CSLApplication has OAuth and API access.
- Type:
- Parameters:
id (BigAutoField) – Primary key: Id
client_id (CharField) – Client id
redirect_uris (TextField) – Redirect uris. Allowed URIs list, space separated
post_logout_redirect_uris (TextField) – Post logout redirect uris. Allowed Post Logout URIs list, space separated
client_type (CharField) – Client type
client_secret (ClientSecretField) – Client secret. Hashed on Save. Copy it now if this is a new secret.
created (DateTimeField) – Created
updated (DateTimeField) – Updated
name (CharField) – Name
authorization_grant_type (CharField) – Authorization grant type
algorithm (CharField) – Algorithm
sanctioned (BooleanField) – Sanctioned. Whether this application is sanctioned by the tjCSL.
skip_authorization (BooleanField) – Skip authorization. Skip the authorization page for this application. This will automatically be set to true upon save if this application is marked as sanctioned by the CSL.
sanctioned_but_do_not_skip_authorization (BooleanField) – Sanctioned but do not skip authorization. Set to true if this application is sanctioned but you do NOT want to skip the authorization page for this application. Overrides automatically skipping authorization for sanctioned applications.
Relationship fields:
- Parameters:
user (
ForeignKey
toUser
) – User (related name:oauth_cslapplication
)
Reverse relationships:
- Parameters:
app (Reverse
ForeignKey
fromApp
) – All apps of this csl application (related name ofoauth_application
)grant (Reverse
ForeignKey
fromGrant
) – All grants of this csl application (related name ofapplication
)accesstoken (Reverse
ForeignKey
fromAccessToken
) – All access tokens of this csl application (related name ofapplication
)refreshtoken (Reverse
ForeignKey
fromRefreshToken
) – All refresh tokens of this csl application (related name ofapplication
)idtoken (Reverse
ForeignKey
fromIDToken
) – All id tokens of this csl application (related name ofapplication
)
Methods
get_algorithm_display
Shows the label of the
algorithm
.get_authorization_grant_type_display
Shows the label of the
authorization_grant_type
.get_client_type_display
Shows the label of the
client_type
.get_next_by_created
Finds next instance based on
created
.get_next_by_updated
Finds next instance based on
updated
.get_previous_by_created
Finds previous instance based on
created
.get_previous_by_updated
Finds previous instance based on
updated
.save
Attributes
ALGORITHM_TYPES
CLIENT_CONFIDENTIAL
CLIENT_PUBLIC
CLIENT_TYPES
GRANT_AUTHORIZATION_CODE
GRANT_CLIENT_CREDENTIALS
GRANT_IMPLICIT
GRANT_OPENID_HYBRID
GRANT_PASSWORD
GRANT_TYPES
HS256_ALGORITHM
NO_ALGORITHM
RS256_ALGORITHM
accesstoken_set
Type: Reverse
ForeignKey
fromAccessToken
app_set
Type: Reverse
ForeignKey
fromApp
grant_set
Type: Reverse
ForeignKey
fromGrant
idtoken_set
Type: Reverse
ForeignKey
fromIDToken
objects
refreshtoken_set
Type: Reverse
ForeignKey
fromRefreshToken
Type:
BooleanField
Type:
BooleanField
user
Type:
ForeignKey
toUser