5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/wolf_core/application/burnett/auth/auth_operations.rb', line 5
def get_erecruit_access_token
response = safe_http_post(
url: ENV['ERECRUIT_AUTH_URL'],
headers: { 'Content-Type' => 'application/x-www-form-urlencoded' },
body: {
client_id: ENV['ERECRUIT_AUTH_CLIENT_ID'],
client_secret: ENV['ERECRUIT_AUTH_CLIENT_SECRET'],
grant_type: ENV['ERECRUIT_AUTH_GRANT_TYPE'],
},
error_message: 'Unable to get erecruit token'
)
access_token = response.body['access_token']
access_token
end
|