Class: KeycloakOauth::PostAuthorizationCodeService

Inherits:
AuthorizableService show all
Defined in:
app/services/keycloak_oauth/post_authorization_code_service.rb

Constant Summary collapse

DEFAULT_GRANT_TYPE =
'authorization_code'.freeze

Constants inherited from AuthorizableService

AuthorizableService::AUTHORIZATION_HEADER, AuthorizableService::CONTENT_TYPE_JSON, AuthorizableService::CONTENT_TYPE_X_WWW_FORM_URLENCODED, AuthorizableService::HTTP_SUCCESS_CODES

Instance Attribute Summary collapse

Attributes inherited from AuthorizableService

#http_response, #parsed_response_body

Instance Method Summary collapse

Methods inherited from AuthorizableService

#perform, uri_with_supported_query_params

Constructor Details

#initialize(connection:, access_token: nil, refresh_token: nil, request_params:) ⇒ PostAuthorizationCodeService

Returns a new instance of PostAuthorizationCodeService.



9
10
11
12
13
14
# File 'app/services/keycloak_oauth/post_authorization_code_service.rb', line 9

def initialize(connection:, access_token: nil, refresh_token: nil, request_params:)
  @connection = connection
  @access_token = access_token
  @refresh_token = refresh_token
  @request_params = request_params
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



7
8
9
# File 'app/services/keycloak_oauth/post_authorization_code_service.rb', line 7

def connection
  @connection
end

#request_paramsObject (readonly)

Returns the value of attribute request_params.



7
8
9
# File 'app/services/keycloak_oauth/post_authorization_code_service.rb', line 7

def request_params
  @request_params
end

Instance Method Details

#send_requestObject



16
17
18
# File 'app/services/keycloak_oauth/post_authorization_code_service.rb', line 16

def send_request
  post_token
end