View Source Boruta.Oauth.IdToken (Boruta core v2.3.3)

OpenID Connect id token schema and utilities

Summary

Types

@type claims() :: %{required(String.t()) => String.t() | claims()}
@type tokens() :: %{
  optional(:code) => %Boruta.Oauth.Token{
    client: Boruta.Oauth.Client.t(),
    code_challenge: term(),
    code_challenge_hash: term(),
    code_challenge_method: term(),
    expires_at: term(),
    inserted_at: DateTime.t(),
    nonce: term(),
    redirect_uri: term(),
    refresh_token: term(),
    refresh_token_revoked_at: term(),
    resource_owner: term(),
    revoked_at: term(),
    scope: String.t(),
    state: term(),
    sub: String.t(),
    type: term(),
    value: term()
  },
  optional(:token) => %Boruta.Oauth.Token{
    client: Boruta.Oauth.Client.t(),
    code_challenge: term(),
    code_challenge_hash: term(),
    code_challenge_method: term(),
    expires_at: term(),
    inserted_at: DateTime.t(),
    nonce: term(),
    redirect_uri: term(),
    refresh_token: term(),
    refresh_token_revoked_at: term(),
    resource_owner: term(),
    revoked_at: term(),
    scope: String.t(),
    state: term(),
    sub: String.t(),
    type: term(),
    value: term()
  },
  optional(:base_token) => %Boruta.Oauth.Token{
    client: Boruta.Oauth.Client.t(),
    code_challenge: term(),
    code_challenge_hash: term(),
    code_challenge_method: term(),
    expires_at: term(),
    inserted_at: DateTime.t(),
    nonce: term(),
    redirect_uri: term(),
    refresh_token: term(),
    refresh_token_revoked_at: term(),
    resource_owner: term(),
    revoked_at: term(),
    scope: String.t(),
    state: term(),
    sub: String.t(),
    type: term(),
    value: term()
  }
}

Functions

@spec generate(tokens :: tokens(), nonce :: String.t()) ::
  id_token :: Boruta.Oauth.Token.t()