Class: OmniAuth::Strategies::AdpOauth2

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/adp_oauth2.rb

Constant Summary collapse

DEFAULT_SCOPE =
%w(
  api
  openid
  profile
  hr.workerInformationManagement.workerManagement.workerViewing.worker.read
  hr.workerInformationManagement.workerManagement.associateManagement.associate.read
  hr.workerInformationManagement.workerManagement.employeeManagement.employee.read
)

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



29
30
31
32
33
34
35
36
37
38
# File 'lib/omniauth/strategies/adp_oauth2.rb', line 29

def authorize_params
  super.tap do |params|
    options[:authorize_options].each do |k|
      params[k] = request.params[k.to_s] unless [nil, ''].include?(request.params[k.to_s])
    end

    params[:scope] = DEFAULT_SCOPE.join(' ')
    session['omniauth.state'] = params[:state] if params['state']
  end
end