Method: DocuSign_Maestro::ApiClient#get_authorization_uri
- Defined in:
- lib/docusign_maestro/client/api_client.rb
#get_authorization_uri(client_id, scopes, redirect_uri, response_type, state = nil) ⇒ String
Helper method to configure the OAuth accessCode/implicit flow parameters
437 438 439 440 441 442 443 444 445 446 |
# File 'lib/docusign_maestro/client/api_client.rb', line 437 def (client_id, scopes, redirect_uri, response_type, state=nil) self.oauth_base_path ||= self.get_oauth_base_path scopes = scopes.join(' ') if scopes.kind_of?(Array) scopes = OAuth::SCOPE_SIGNATURE if scopes.empty? uri = "https://%{base_path}/oauth/auth?response_type=%{response_type}&scope=%{scopes}&client_id=%{client_id}&redirect_uri=%{redirect_uri}" uri += "&state=%{state}" if state uri % {base_path: self.oauth_base_path, response_type:response_type, scopes: scopes, client_id: client_id, redirect_uri: redirect_uri, state: state} end |