Class: Soar::Authentication::IdentityUuidTranslator::Provider::Staff
- Inherits:
-
Object
- Object
- Soar::Authentication::IdentityUuidTranslator::Provider::Staff
- Defined in:
- lib/soar/authentication/identity_uuid_translator/provider/staff.rb
Constant Summary collapse
- ROLE =
"hetzner_staff_member"
Instance Method Summary collapse
-
#initialize(identifier:, identity_registry:, role_generator: nil) ⇒ Staff
constructor
A new instance of Staff.
- #uuid ⇒ Object
Constructor Details
#initialize(identifier:, identity_registry:, role_generator: nil) ⇒ Staff
Returns a new instance of Staff.
11 12 13 14 15 |
# File 'lib/soar/authentication/identity_uuid_translator/provider/staff.rb', line 11 def initialize(identifier: , identity_registry: , role_generator: nil) @identifier = identifier @idr = identity_registry @role_generator = role_generator end |
Instance Method Details
#uuid ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/soar/authentication/identity_uuid_translator/provider/staff.rb', line 17 def uuid return @uuid if not @uuid.nil? identifiers = @idr.get_identifiers(@identifier) @uuid = identifiers[0] @role_generator.generate({ "identity_uuid" => uuid, "identity_role" => ROLE }) if not @role_generator.nil? return @uuid end |