Class: Soar::Authentication::Identity::Provider::Stub

Inherits:
Object
  • Object
show all
Defined in:
lib/soar/authentication/identity/provider/stub.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(directory: nil, authenticated_identifier: nil) ⇒ Stub

Returns a new instance of Stub.



11
12
13
14
# File 'lib/soar/authentication/identity/provider/stub.rb', line 11

def initialize(directory: nil, authenticated_identifier: nil)
  @directory = directory
  @entries = @directory.search("identifier", authenticated_identifier)
end

Instance Attribute Details

#directoryObject (readonly)

Returns the value of attribute directory.



9
10
11
# File 'lib/soar/authentication/identity/provider/stub.rb', line 9

def directory
  @directory
end

Instance Method Details

#roleObject



21
22
23
# File 'lib/soar/authentication/identity/provider/stub.rb', line 21

def role
  "stub"
end

#uuidObject



16
17
18
19
# File 'lib/soar/authentication/identity/provider/stub.rb', line 16

def uuid
  primary_key = @directory.index[0]
  @entries[0][primary_key]
end