Class: SignIn::StatePayloadJwtEncoder
- Inherits:
-
Object
- Object
- SignIn::StatePayloadJwtEncoder
- Defined in:
- app/services/sign_in/state_payload_jwt_encoder.rb
Instance Attribute Summary collapse
-
#acr ⇒ Object
readonly
Returns the value of attribute acr.
-
#client_config ⇒ Object
readonly
Returns the value of attribute client_config.
-
#client_state ⇒ Object
readonly
Returns the value of attribute client_state.
-
#code_challenge ⇒ Object
readonly
Returns the value of attribute code_challenge.
-
#code_challenge_method ⇒ Object
readonly
Returns the value of attribute code_challenge_method.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(code_challenge:, code_challenge_method:, acr:, client_config:, type:, client_state: nil) ⇒ StatePayloadJwtEncoder
constructor
rubocop:disable Metrics/ParameterLists.
-
#perform ⇒ Object
rubocop:enable Metrics/ParameterLists.
Constructor Details
#initialize(code_challenge:, code_challenge_method:, acr:, client_config:, type:, client_state: nil) ⇒ StatePayloadJwtEncoder
rubocop:disable Metrics/ParameterLists
8 9 10 11 12 13 14 15 |
# File 'app/services/sign_in/state_payload_jwt_encoder.rb', line 8 def initialize(code_challenge:, code_challenge_method:, acr:, client_config:, type:, client_state: nil) @acr = acr @client_config = client_config @type = type @code_challenge = code_challenge @code_challenge_method = code_challenge_method @client_state = client_state end |
Instance Attribute Details
#acr ⇒ Object (readonly)
Returns the value of attribute acr.
5 6 7 |
# File 'app/services/sign_in/state_payload_jwt_encoder.rb', line 5 def acr @acr end |
#client_config ⇒ Object (readonly)
Returns the value of attribute client_config.
5 6 7 |
# File 'app/services/sign_in/state_payload_jwt_encoder.rb', line 5 def client_config @client_config end |
#client_state ⇒ Object (readonly)
Returns the value of attribute client_state.
5 6 7 |
# File 'app/services/sign_in/state_payload_jwt_encoder.rb', line 5 def client_state @client_state end |
#code_challenge ⇒ Object (readonly)
Returns the value of attribute code_challenge.
5 6 7 |
# File 'app/services/sign_in/state_payload_jwt_encoder.rb', line 5 def code_challenge @code_challenge end |
#code_challenge_method ⇒ Object (readonly)
Returns the value of attribute code_challenge_method.
5 6 7 |
# File 'app/services/sign_in/state_payload_jwt_encoder.rb', line 5 def code_challenge_method @code_challenge_method end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'app/services/sign_in/state_payload_jwt_encoder.rb', line 5 def type @type end |
Instance Method Details
#perform ⇒ Object
rubocop:enable Metrics/ParameterLists
18 19 20 21 22 23 |
# File 'app/services/sign_in/state_payload_jwt_encoder.rb', line 18 def perform validate_pkce_params if client_config.pkce? validate_state_payload save_state_code jwt_encode_state_payload end |