View Source Boruta.Oauth.Client (Boruta core v2.2.2)

OAuth client schema and utilities

Link to this section Summary

Link to this section Types

@type t() :: %Boruta.Oauth.Client{
  access_token_ttl: integer(),
  authorization_code_ttl: integer(),
  authorize_scope: boolean(),
  authorized_scopes: [Boruta.Oauth.Scope.t()],
  confidential: boolean(),
  id: any(),
  id_token_signature_alg: String.t(),
  id_token_ttl: integer(),
  name: String.t(),
  pkce: boolean(),
  private_key: String.t(),
  public_key: String.t(),
  public_refresh_token: boolean(),
  public_revoke: boolean(),
  redirect_uris: [String.t()],
  refresh_token_ttl: integer(),
  secret: String.t(),
  supported_grant_types: [String.t()]
}

Link to this section Functions

Link to this function

check_redirect_uri(client, redirect_uri)

View Source
@spec check_redirect_uri(client :: t(), redirect_uri :: String.t()) ::
  :ok | {:error, String.t()}
Link to this function

check_secret(client, secret)

View Source
@spec check_secret(client :: t(), secret :: String.t()) :: :ok | {:error, String.t()}
Link to this function

grant_type_supported?(client, grant_type)

View Source
@spec grant_type_supported?(client :: t(), grant_type :: String.t()) :: boolean()
@spec grant_types() :: grant_types :: [String.t()]

Returns grant types supported by the server. Boruta.Oauth.Client supported_grant_types attribute may be a subset of them.

Link to this function

public_refresh_token?(client)

View Source
@spec public_refresh_token?(client :: t()) :: boolean()
@spec public_revoke?(client :: t()) :: boolean()
Link to this function

should_check_secret?(client, grant_type)

View Source
@spec should_check_secret?(client :: t(), grant_type :: String.t()) :: boolean()