Class: OmniAuth::Strategies::Hydra1
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Hydra1
- Defined in:
- lib/omniauth/strategies/hydra1.rb
Direct Known Subclasses
Instance Method Summary collapse
- #authorize_params ⇒ Object
- #callback_url ⇒ Object
- #email ⇒ Object
-
#fullname ⇒ Object
use fullname to avoid clash with ‘name’.
- #image ⇒ Object
- #nickname ⇒ Object
- #raw_info ⇒ Object
-
#username ⇒ Object
<13 accounts have username instead of email.
Instance Method Details
#authorize_params ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/omniauth/strategies/hydra1.rb', line 15 def super.tap do |params| %w[scope client_options login_options].each do |v| params[v.to_sym] = request.params[v] if request.params[v] end end end |
#callback_url ⇒ Object
23 24 25 |
# File 'lib/omniauth/strategies/hydra1.rb', line 23 def callback_url full_host + callback_path end |
#email ⇒ Object
49 50 51 |
# File 'lib/omniauth/strategies/hydra1.rb', line 49 def email raw_info['email'] end |
#fullname ⇒ Object
use fullname to avoid clash with ‘name’
63 64 65 |
# File 'lib/omniauth/strategies/hydra1.rb', line 63 def fullname raw_info['name'] end |
#image ⇒ Object
67 68 69 70 |
# File 'lib/omniauth/strategies/hydra1.rb', line 67 def image # deserialise openid claim into auth schema raw_info['picture'] end |
#nickname ⇒ Object
58 59 60 |
# File 'lib/omniauth/strategies/hydra1.rb', line 58 def nickname raw_info['nickname'] end |
#raw_info ⇒ Object
45 46 47 |
# File 'lib/omniauth/strategies/hydra1.rb', line 45 def raw_info @raw_info ||= (JWT.decode access_token.params['id_token'], nil, false)[0] end |
#username ⇒ Object
<13 accounts have username instead of email
54 55 56 |
# File 'lib/omniauth/strategies/hydra1.rb', line 54 def username raw_info['username'] end |