Class: OIDCProvider::ClientStore

Inherits:
Object
  • Object
show all
Defined in:
lib/oidc_provider/client_store.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientsObject (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