class OmniAuth::Strategies::OpenEdx

Constants

DEFAULT_SCOPE

Public Instance Methods

authorize_params() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/open_edx.rb, line 50
def authorize_params
  super.tap do |params|
    %w[scope].each do |v|
      params[v.to_sym] = request.params[v] if request.params[v]
    end

    params[:scope] ||= DEFAULT_SCOPE
  end
end
callback_url() click to toggle source
# File lib/omniauth/strategies/open_edx.rb, line 43
def callback_url
  # overwrite this function from omniauth
  # https://github.com/omniauth/omniauth/blob/c2380ae848ce4e0e39b4bb94c5b8e3fd0a544825/lib/omniauth/strategy.rb#L444
  # edx greatly dislikes when query_string is part of the callback_url
  full_host + callback_path
end
raw_info() click to toggle source
# File lib/omniauth/strategies/open_edx.rb, line 39
def raw_info
  @raw_info ||= jwt_payload
end

Private Instance Methods

jwt_payload() click to toggle source
# File lib/omniauth/strategies/open_edx.rb, line 62
def jwt_payload
  JWT.decode(access_token.token, nil, false)[0]
end