Class: Bosh::Director::Api::UaaUser

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/api/uaa_identity_provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ UaaUser

Returns a new instance of UaaUser.



74
75
76
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 74

def initialize(token)
  @token = token
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



72
73
74
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 72

def token
  @token
end

Instance Method Details

#scopesObject



82
83
84
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 82

def scopes
  @token['scope']
end

#usernameObject



78
79
80
# File 'lib/bosh/director/api/uaa_identity_provider.rb', line 78

def username
  @token['user_name'] || @token['client_id']
end