class OmniAuth::Strategies::Auth0
Constants
- PASSTHROUGHS
Public Class Methods
new(app, *args, &block)
click to toggle source
Calls superclass method
# File lib/omniauth/strategies/auth0.rb, line 19 def initialize(app, *args, &block) super fail(ArgumentError.new("Received wrong number of arguments. #{args.inspect}")) if @options[:namespace].nil? @options.provider_ignores_state = args[3] unless args[3].nil? @options.connection = args[4] unless args[4].nil? @options.client_options.site = "https://#{options[:namespace]}" @options.client_options.authorize_url = "https://#{options[:namespace]}/authorize?#{client_info_querystring}" @options.client_options.token_url = "https://#{options[:namespace]}/oauth/token?#{client_info_querystring}" @options.client_options.userinfo_url = "https://#{options[:namespace]}/userinfo" end
Public Instance Methods
raw_info()
click to toggle source
# File lib/omniauth/strategies/auth0.rb, line 72 def raw_info @raw_info ||= access_token.get(options.client_options.userinfo_url).parsed end
Private Instance Methods
client_info_querystring()
click to toggle source
# File lib/omniauth/strategies/auth0.rb, line 77 def client_info_querystring client_info = JSON.dump({name: 'omniauth-auth0', version: OmniAuth::Auth0::VERSION}) "auth0Client=" + Base64.urlsafe_encode64(client_info) end