Adapter#
- class allauth.idp.oidc.adapter.DefaultOIDCAdapter(request=None)#
The adapter class allows you to override various functionality of the
allauth.idp.oidc
app. To do so, pointsettings.IDP_OIDC_ADAPTER
to your own class that derives fromDefaultOIDCAdapter
and override the behavior by altering the implementation of the methods according to your own needs.- generate_client_id() str #
The client ID to use for newly created clients.
- generate_client_secret() str #
The client secret to use for newly created clients.
- get_issuer() str #
Returns the URL of the issuer.
- get_user_by_sub(client, sub: str)#
Looks up a user, given its subject identifier. Returns None if no such user was found.
- get_user_sub(client, user) str #
Returns the “sub” (subject identifier) for the given user.
- hash_token(token: str) str #
We don’t store tokens directly, only the hash of the token. This methods generates that hash.
- populate_id_token(id_token: dict, client, scopes, **kwargs) None #
This method can be used to alter the ID token payload. It is already populated with basic values. Depending on the client and requested scopes, you can expose additional information here.