Method: Justa::TokenManager.client_for
- Defined in:
- lib/justa/token_manager.rb
.client_for(key = Justa.default_client_key) ⇒ Justa::Client
Find a Client for a specific Key
107 108 109 110 111 112 113 114 115 116 |
# File 'lib/justa/token_manager.rb', line 107 def self.client_for(key = Justa.default_client_key) k = Justa::Util.to_sym(key) instance unless @instance return nil unless @instance.authenticators.present? @instance.mutex.synchronize do auth = @instance.authenticators.find { |obj| obj.key == k } auth&.client end end |