app/models/auth_server.rb
##
# Exchanges the authorization_code for an access token and id_token.
# It returns the decoded content of the id_token.
Exchanges the authorization_code for an access token and id_token.
It returns the decoded content of the id_token.
Exchanges the authorization_code for an access token and id_token . It returns the decoded content of the id_token .
def exchange_code(code)
    oidc_response = faraday_connection.post(
      token_endpoint,
      grant_type: 'authorization_code',
      client_id: client_id,
      client_secret: client_secret,
      code: code,
      redirect_uri: Rails.application.routes.url_helpers.launch_callback_url
    )
    JWT.decode(oidc_response.body.id_token, nil, false, algorithm: 'RS256').first
  end
def exchange_code ( code ) oidc_response = faraday_connection . post ( token_endpoint , grant_type : 'authorization_code' , client_id : client_id , client_secret : client_secret , code : code , redirect_uri : Rails . application . routes . url_helpers . launch_callback_url ) JWT . decode ( oidc_response . body . id_token , nil , false , algorithm : 'RS256' ) . first end
Exchanges the authorization_code for an access token and id_token.
Exchanges the authorization_code for an access token and id_token .
code
<not_specific>