Class: OIDCProvider::ClientStore
- Inherits:
-
Object
- Object
- OIDCProvider::ClientStore
- Defined in:
- lib/oidc_provider/client_store.rb
Instance Attribute Summary collapse
-
#clients ⇒ Object
readonly
Returns the value of attribute clients.
Instance Method Summary collapse
- #find_by(attrs) ⇒ Object
-
#initialize(clients = OIDCProvider.clients) ⇒ ClientStore
constructor
A new instance of ClientStore.
Constructor Details
#initialize(clients = OIDCProvider.clients) ⇒ ClientStore
Returns a new instance of ClientStore.
5 6 7 |
# File 'lib/oidc_provider/client_store.rb', line 5 def initialize(clients = OIDCProvider.clients) @clients = clients end |
Instance Attribute Details
#clients ⇒ Object (readonly)
Returns the value of attribute clients.
3 4 5 |
# File 'lib/oidc_provider/client_store.rb', line 3 def clients @clients end |
Instance Method Details
#find_by(attrs) ⇒ Object
9 10 11 |
# File 'lib/oidc_provider/client_store.rb', line 9 def find_by(attrs) clients.detect { |client| attrs.all? { |key, value| client.send(key) == value } } end |