Class: PkceOauth::CodeVerifier
- Inherits:
-
Object
- Object
- PkceOauth::CodeVerifier
- Defined in:
- lib/pkce_oauth/code_verifier.rb
Defined Under Namespace
Classes: KeyLengthError
Constant Summary collapse
- MINIMUM_KEY_LENGTH =
43- DEFAULT_KEY_LENGTH =
128
Instance Attribute Summary collapse
-
#key_length ⇒ Object
readonly
Returns the value of attribute key_length.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(key_length: DEFAULT_KEY_LENGTH) ⇒ CodeVerifier
constructor
A new instance of CodeVerifier.
Constructor Details
#initialize(key_length: DEFAULT_KEY_LENGTH) ⇒ CodeVerifier
Returns a new instance of CodeVerifier.
12 13 14 |
# File 'lib/pkce_oauth/code_verifier.rb', line 12 def initialize(key_length: DEFAULT_KEY_LENGTH) @key_length = validate_key_length(key_length) end |
Instance Attribute Details
#key_length ⇒ Object (readonly)
Returns the value of attribute key_length.
10 11 12 |
# File 'lib/pkce_oauth/code_verifier.rb', line 10 def key_length @key_length end |
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'lib/pkce_oauth/code_verifier.rb', line 16 def call PkceOauth.generate_limited_code_verifier(key_length) end |