CSLApplication¶
Qualified name: intranet.apps.oauth.models.CSLApplication
- class intranet.apps.oauth.models.CSLApplication(*args, **kwargs)[source]¶
Bases:
AbstractApplicationExtends the default OAuth Application model to add CSL-specific information about an OAuth application. Disables the implicit, password, and OIDC implicit grant types.
- 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.
hash_client_secret (BooleanField) – Hash client secret
created (DateTimeField) – Created
updated (DateTimeField) – Updated
allowed_origins (TextField) – Allowed origins. Allowed origins list to enable CORS, space separated
oidc_enabled (BooleanField) – Oidc enabled
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 (
ForeignKeytoUser) – User (related name:oauth_cslapplication)
Reverse relationships:
- Parameters:
app (Reverse
ForeignKeyfromApp) – All apps of this csl application (related name ofoauth_application)grant (Reverse
ForeignKeyfromGrant) – All grants of this csl application (related name ofapplication)accesstoken (Reverse
ForeignKeyfromAccessToken) – All access tokens of this csl application (related name ofapplication)refreshtoken (Reverse
ForeignKeyfromRefreshToken) – All refresh tokens of this csl application (related name ofapplication)idtoken (Reverse
ForeignKeyfromIDToken) – All id tokens of this csl application (related name ofapplication)
Methods
get_algorithm_displayShows the label of the
algorithm.get_authorization_grant_type_displayShows the label of the
authorization_grant_type.get_client_type_displayShows the label of the
client_type.get_next_by_createdFinds next instance based on
created.get_next_by_updatedFinds next instance based on
updated.get_previous_by_createdFinds previous instance based on
created.get_previous_by_updatedFinds previous instance based on
updated.saveAttributes
ALGORITHM_TYPESCLIENT_CONFIDENTIALCLIENT_PUBLICCLIENT_TYPESGRANT_AUTHORIZATION_CODEGRANT_CLIENT_CREDENTIALSGRANT_IMPLICITGRANT_OPENID_HYBRIDGRANT_PASSWORDGRANT_TYPESHS256_ALGORITHMNO_ALGORITHMRS256_ALGORITHMaccesstoken_setType: Reverse
ForeignKeyfromAccessTokenalgorithmType:
CharFieldallowed_originsType:
TextFieldapp_setType: Reverse
ForeignKeyfromAppauthorization_grant_typeType:
CharFieldclient_idType:
CharFieldclient_secretType:
ClientSecretFieldclient_typeType:
CharFieldcreatedType:
DateTimeFieldgrant_setType: Reverse
ForeignKeyfromGranthash_client_secretType:
BooleanFieldidType:
BigAutoFieldidtoken_setType: Reverse
ForeignKeyfromIDTokennameType:
CharFieldobjectsoidc_enabledType:
BooleanFieldpost_logout_redirect_urisType:
TextFieldredirect_urisType:
TextFieldrefreshtoken_setType: Reverse
ForeignKeyfromRefreshTokenType:
BooleanFieldType:
BooleanFieldskip_authorizationType:
BooleanFieldupdatedType:
DateTimeFielduserType:
ForeignKeytoUseruser_idInternal field, use
userinstead.