Class: Soar::Authentication::Identity::Provider::Staff
- Inherits:
-
Object
- Object
- Soar::Authentication::Identity::Provider::Staff
- Defined in:
- lib/soar/authentication/identity/provider/staff.rb
Instance Attribute Summary collapse
-
#directory ⇒ Object
readonly
Returns the value of attribute directory.
Instance Method Summary collapse
-
#initialize(directory: nil, authenticated_identifier: nil) ⇒ Staff
constructor
A new instance of Staff.
- #role ⇒ Object
- #uuid ⇒ Object
Constructor Details
#initialize(directory: nil, authenticated_identifier: nil) ⇒ Staff
Returns a new instance of Staff.
11 12 13 14 15 16 |
# File 'lib/soar/authentication/identity/provider/staff.rb', line 11 def initialize(directory: nil, authenticated_identifier: nil) @directory = directory @authenticated_identifier = authenticated_identifier identity_provider = Soar::Registry::Identity::Provider::Staff::Email.new(directory: @directory) @identity_registry = Soar::Registry::Identity.new(identity_provider) end |
Instance Attribute Details
#directory ⇒ Object (readonly)
Returns the value of attribute directory.
9 10 11 |
# File 'lib/soar/authentication/identity/provider/staff.rb', line 9 def directory @directory end |
Instance Method Details
#role ⇒ Object
24 25 26 |
# File 'lib/soar/authentication/identity/provider/staff.rb', line 24 def role "staff" end |
#uuid ⇒ Object
18 19 20 21 22 |
# File 'lib/soar/authentication/identity/provider/staff.rb', line 18 def uuid attributes = @identity_registry.get_attributes(@authenticated_identifier) primary_key = @directory.index[0] attributes[primary_key] end |