Class: Warden::Cognito::TestHelpers
- Inherits:
-
Object
- Object
- Warden::Cognito::TestHelpers
show all
- Defined in:
- lib/warden/cognito/test_helpers.rb
Defined Under Namespace
Classes: EnvironmentError
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.jwk ⇒ Object
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
15
16
17
18
|
# File 'lib/warden/cognito/test_helpers.rb', line 15
def (, user, pool_identifier = Warden::Cognito.config.user_pools.first.identifier,
claims = {})
.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
|
.setup ⇒ Object
11
12
13
|
# File 'lib/warden/cognito/test_helpers.rb', line 11
def setup
Warden::Cognito.config.jwk = { key: jwk, issuer: local_issuer }
end
|