Class: OmniAuth::Strategies::G5
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::G5
- Defined in:
- lib/omniauth/strategies/g5.rb
Instance Method Summary collapse
Instance Method Details
#display_name ⇒ Object
35 36 37 |
# File 'lib/omniauth/strategies/g5.rb', line 35 def display_name "#{raw_info['first_name']} #{raw_info['last_name']}".strip end |
#raw_info ⇒ Object
31 32 33 |
# File 'lib/omniauth/strategies/g5.rb', line 31 def raw_info @raw_info ||= access_token.get('/v1/me.json').parsed end |
#roles ⇒ Object
39 40 41 42 43 |
# File 'lib/omniauth/strategies/g5.rb', line 39 def roles [raw_info['roles']].flatten.collect do |role| {name: role['name'], type: role['type'], urn: role['urn']} end end |