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.
51 52 53 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 51 def initialize(token) @token = token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
49 50 51 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 49 def token @token end |
Instance Method Details
#client ⇒ Object
59 60 61 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 59 def client @token['client_id'] end |
#scopes ⇒ Object
67 68 69 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 67 def scopes @token['scope'] end |
#username ⇒ Object
63 64 65 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 63 def username @token['user_name'] end |
#username_or_client ⇒ Object
55 56 57 |
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 55 def username_or_client @token['user_name'] || @token['client_id'] end |