Class: Warden::Cognito::TestHelpers
- Inherits:
-
Object
- Object
- Warden::Cognito::TestHelpers
- Defined in:
- lib/warden/cognito/test_helpers.rb
Defined Under Namespace
Classes: EnvironmentError
Class Attribute Summary collapse
-
.jwk ⇒ Object
readonly
Returns the value of attribute jwk.
Class Method Summary collapse
- .auth_headers(headers, user, pool_identifier = Warden::Cognito.config.user_pools.first.identifier, claims = {}) ⇒ Object
- .local_issuer ⇒ Object
- .setup ⇒ Object
Class Attribute Details
.jwk ⇒ Object (readonly)
Returns the value of attribute jwk.
9 10 11 |
# File 'lib/warden/cognito/test_helpers.rb', line 9 def jwk @jwk end |
Class Method Details
.auth_headers(headers, user, pool_identifier = Warden::Cognito.config.user_pools.first.identifier, claims = {}) ⇒ Object
15 16 17 18 |
# File 'lib/warden/cognito/test_helpers.rb', line 15 def auth_headers(headers, user, pool_identifier = Warden::Cognito.config.user_pools.first.identifier, claims = {}) headers.merge(Authorization: "Bearer #{generate_token(user, pool_identifier, claims)}") end |
.local_issuer ⇒ Object
20 21 22 |
# File 'lib/warden/cognito/test_helpers.rb', line 20 def local_issuer 'local_issuer' end |