Class: Maestrano::SSO::BaseMembership
- Inherits:
-
Object
- Object
- Maestrano::SSO::BaseMembership
- Defined in:
- lib/maestrano/sso/base_membership.rb
Instance Attribute Summary collapse
-
#group_uid ⇒ Object
readonly
Returns the value of attribute group_uid.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#user_uid ⇒ Object
readonly
Returns the value of attribute user_uid.
Instance Method Summary collapse
-
#initialize(saml_response) ⇒ BaseMembership
constructor
Initializer.
- #to_hash ⇒ Object
Constructor Details
#initialize(saml_response) ⇒ BaseMembership
Initializer
8 9 10 11 12 13 |
# File 'lib/maestrano/sso/base_membership.rb', line 8 def initialize(saml_response) att = saml_response.attributes @user_uid = att['uid'] @group_uid = att['group_uid'] @role = att['group_role'] end |
Instance Attribute Details
#group_uid ⇒ Object (readonly)
Returns the value of attribute group_uid.
4 5 6 |
# File 'lib/maestrano/sso/base_membership.rb', line 4 def group_uid @group_uid end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
4 5 6 |
# File 'lib/maestrano/sso/base_membership.rb', line 4 def role @role end |
#user_uid ⇒ Object (readonly)
Returns the value of attribute user_uid.
4 5 6 |
# File 'lib/maestrano/sso/base_membership.rb', line 4 def user_uid @user_uid end |
Instance Method Details
#to_hash ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/maestrano/sso/base_membership.rb', line 15 def to_hash { provider: 'maestrano', group_uid: self.group_uid, user_uid: self.user_uid, role: self.role } end |