class OmniAuth::Strategies::Oktaoauth
Constants
- DEFAULT_SCOPE
Public Instance Methods
access_token()
click to toggle source
# File lib/omniauth/strategies/oktaoauth.rb, line 51 def access_token ::OAuth2::AccessToken.new(client, oauth2_access_token.token, { :expires_in => oauth2_access_token.expires_in, :expires_at => oauth2_access_token.expires_at }) end
Also aliased as: oauth2_access_token
callback_phase()
click to toggle source
Calls superclass method
# File lib/omniauth/strategies/oktaoauth.rb, line 74 def callback_phase super end
callback_url()
click to toggle source
# File lib/omniauth/strategies/oktaoauth.rb, line 78 def callback_url options[:redirect_uri] || (full_host + script_name + callback_path) end
raw_info()
click to toggle source
# File lib/omniauth/strategies/oktaoauth.rb, line 58 def raw_info if options[:auth_server_id] options[:auth_server_id] = options[:auth_server_id] + "/" else options[:auth_server_id] = "" end @_raw_info ||= access_token.get('/oauth2/' + options[:auth_server_id] + 'v1/userinfo').parsed || {} rescue ::Errno::ETIMEDOUT raise ::Timeout::Error end
request_phase()
click to toggle source
Calls superclass method
# File lib/omniauth/strategies/oktaoauth.rb, line 70 def request_phase super end
validated_token(token)
click to toggle source
# File lib/omniauth/strategies/oktaoauth.rb, line 82 def validated_token(token) JWT.decode(token, nil, false, verify_iss: true, iss: options[:issuer], verify_aud: true, aud: options[:audience], verify_sub: true, verify_expiration: true, verify_not_before: true, verify_iat: true, verify_jti: false, leeway: options[:jwt_leeway] ).first end