README
Install
gem 'work_auth_client'
Create and configure a new client:
work_auth_client = new WorkAuthClient::Client
work_auth_client.host = 'https://work-auth-server.com'
Generate an access token for your application:
req = new WorkAuthClient::ClientCredentialsRequest.new(
client_id: 'your-client-id',
client_secret: 'your-client-secret',
)
resp = work_auth_client.access_token(req)
if resp.status == 'success'
access_token = resp.body.access_token
end