View Source Boruta.Oauth.AuthorizeResponse (Boruta ssi core v0.1.0-beta.1)

Response returned in case of authorization request success. Provides utilities and mandatory data needed to respond to the authorize part of implicit, code and hybrid flows.

Summary

Types

@type t() :: %Boruta.Oauth.AuthorizeResponse{
  access_token: String.t() | nil,
  code: String.t() | nil,
  code_challenge: String.t() | nil,
  code_challenge_method: String.t() | nil,
  expires_in: integer(),
  id_token: String.t() | nil,
  redirect_uri: String.t(),
  response_mode: String.t() | nil,
  state: String.t() | nil,
  token_type: String.t() | nil,
  type: :token | :code | :hybrid
}

Functions

Link to this function

from_tokens(params, request)

View Source
@spec from_tokens(
  %{
    required(
      type :: :siopv2_code | :preauthorized_code | :code | :token | :id_token
    ) => token :: Boruta.Oauth.Token.t() | String.t()
  },
  request ::
    Boruta.Oauth.CodeRequest.t()
    | Boruta.Oauth.TokenRequest.t()
    | Boruta.Oauth.HybridRequest.t()
) ::
  t()
  | Boruta.Openid.CredentialOfferResponse.t()
  | Boruta.Openid.SiopV2Response.t()
  | Boruta.Openid.VerifiablePresentationResponse.t()
  | {:error, Boruta.Oauth.Error.t()}
Link to this function

redirect_to_url(response)

View Source
@spec redirect_to_url(t()) :: url :: String.t()