extensions/auth.rb in purecloud-0.27.0 vs extensions/auth.rb in purecloud-0.28.0
- old
+ new
@@ -21,9 +21,16 @@
'content-type'=> 'application/x-www-form-urlencoded',
:accept => :json)
self.configure.access_token = tokenData["access_token"]
end
+ # Retrieves an Access token given an authorization code (authorization code grant)
+ #
+ # @param auth_code Authorization code from the OAuth redirec
+ # @param client_id OAuth client id
+ # @param client_secret OAuth client secret
+ # @param client_secret OAuth redirect URI
+ # @param environment (Optional) PureCloud environment (mypurecloud.com, mypurecloud.ie, mypurecloud.com.au, etc)
def get_access_token_from_auth_code(auth_code, client_id, client_secret, redirect_uri, environment = nil)
environment ||= "mypurecloud.com"
tokenFormData = {
"grant_type" => "authorization_code",