Module: Warden::Cognito::HasUserPoolIdentifier

Included in:
CognitoClient, JwkLoader
Defined in:
lib/warden/cognito/has_user_pool_identifier.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
# File 'lib/warden/cognito/has_user_pool_identifier.rb', line 4

def self.included(base)
  base.extend ClassMethods
  base.class_eval do
    attr_reader :user_pool
  end
end

Instance Method Details

#pool_identifierObject



15
16
17
# File 'lib/warden/cognito/has_user_pool_identifier.rb', line 15

def pool_identifier
  user_pool.identifier
end

#user_pool=(pool_identifier) ⇒ Object



11
12
13
# File 'lib/warden/cognito/has_user_pool_identifier.rb', line 11

def user_pool=(pool_identifier)
  @user_pool = user_pools.detect(self.class.invalid_issuer_error) { |pool| pool.identifier == pool_identifier }
end