Class: Bosh::Director::Api::UaaUser
- Defined in:
- lib/bosh/director/api/uaa_identity_provider.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #client ⇒ Object
-
#initialize(token) ⇒ UaaUser
constructor
A new instance of UaaUser.
- #scopes ⇒ Object
- #username ⇒ Object
- #username_or_client ⇒ Object
Constructor Details
#initialize(token) ⇒ UaaUser
Returns a new instance of UaaUser.
57 58 59 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 57 def initialize(token) @token = token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
55 56 57 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 55 def token @token end |
Instance Method Details
#client ⇒ Object
65 66 67 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 65 def client @token['client_id'] end |
#scopes ⇒ Object
73 74 75 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 73 def scopes @token['scope'] end |
#username ⇒ Object
69 70 71 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 69 def username @token['user_name'] end |
#username_or_client ⇒ Object
61 62 63 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 61 def username_or_client @token['user_name'] || @token['client_id'] end |