Class: SolidusJwt::Preferences
- Inherits:
-
Spree::Preferences::Configuration
- Object
- Spree::Preferences::Configuration
- SolidusJwt::Preferences
- Defined in:
- lib/solidus_jwt/preferences.rb
Instance Attribute Summary collapse
-
#allow_spree_api_key ⇒ String
Allow spree_api_key to still be used.
-
#jwt_algorithm ⇒ String
The hashing algorithm to use.
-
#jwt_expiration ⇒ String
(default:
3600
). -
#jwt_options ⇒ String
when creating the jwt payload.
-
#jwt_secret ⇒ String
Get the secret token to encrypt json web tokens with.
-
#refresh_expriation ⇒ String
(default:
2592000
).
Instance Attribute Details
#allow_spree_api_key ⇒ String
Returns Allow spree_api_key to still be used. (default true).
17 |
# File 'lib/solidus_jwt/preferences.rb', line 17 preference :allow_spree_api_key, :boolean, default: true |
#jwt_algorithm ⇒ String
Returns The hashing algorithm to use. (default ‘HS256’).
24 |
# File 'lib/solidus_jwt/preferences.rb', line 24 preference :jwt_algorithm, :string, default: 'HS256' |
#jwt_expiration ⇒ String
(default: 3600
)
30 |
# File 'lib/solidus_jwt/preferences.rb', line 30 preference :jwt_expiration, :integer, default: 3600 |
#jwt_options ⇒ String
when creating the jwt payload. (default: ‘{ only: %i[email first_name id last_name] }`)
37 |
# File 'lib/solidus_jwt/preferences.rb', line 37 preference :jwt_options, :hash, default: { only: %i[email first_name id last_name] } |
#jwt_secret ⇒ String
Get the secret token to encrypt json web tokens with.
50 51 52 53 |
# File 'lib/solidus_jwt/preferences.rb', line 50 def jwt_secret # Account for different rails versions @jwt_secret ||= ENV['SECRET_KEY_BASE'] || Rails.application.secret_key_base end |
#refresh_expriation ⇒ String
(default: 2592000
)
43 |
# File 'lib/solidus_jwt/preferences.rb', line 43 preference :refresh_expiration, :integer, default: 2_592_000 |