Class: UltracartClient::SsoApi
- Inherits:
-
Object
- Object
- UltracartClient::SsoApi
- Defined in:
- lib/ultracart_api/api/sso_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Class Method Summary collapse
Instance Method Summary collapse
-
#get_sso_session_user(opts = {}) ⇒ User
Get single sign on session user This is the equivalent of logging out of the single sign on session.
-
#get_sso_session_user_with_http_info(opts = {}) ⇒ Array<(User, Fixnum, Hash)>
Get single sign on session user This is the equivalent of logging out of the single sign on session.
-
#initialize(api_client = ApiClient.default) ⇒ SsoApi
constructor
A new instance of SsoApi.
-
#sso_authorize(authorization_request, opts = {}) ⇒ SingleSignOnAuthorizeResponse
Authorize a single sign on session Starts the process of authorizing a single sign on session.
-
#sso_authorize_with_http_info(authorization_request, opts = {}) ⇒ Array<(SingleSignOnAuthorizeResponse, Fixnum, Hash)>
Authorize a single sign on session Starts the process of authorizing a single sign on session.
-
#sso_session_revoke(opts = {}) ⇒ nil
Revoke single sign on session This is the equivalent of logging out of the single sign on session.
-
#sso_session_revoke_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Revoke single sign on session This is the equivalent of logging out of the single sign on session.
-
#sso_token(token_request, opts = {}) ⇒ SingleSignOnTokenResponse
Exchange a single sign on code for a simple key token Called by your application after receiving the code back on the redirect URI to obtain a simple key token to make API calls with.
-
#sso_token_with_http_info(token_request, opts = {}) ⇒ Array<(SingleSignOnTokenResponse, Fixnum, Hash)>
Exchange a single sign on code for a simple key token Called by your application after receiving the code back on the redirect URI to obtain a simple key token to make API calls with.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ultracart_api/api/sso_api.rb', line 17 def api_client @api_client end |
Class Method Details
.new_using_api_key(simple_key, verify_ssl = true, debugging = false) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ultracart_api/api/sso_api.rb', line 23 def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false) api_config = Configuration.new api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key api_config.api_version = '2017-03-01' api_config.verify_ssl = verify_ssl api_client = ApiClient.new(api_config) api_client.config.debugging = debugging UltracartClient::SsoApi.new(api_client) end |
Instance Method Details
#get_sso_session_user(opts = {}) ⇒ User
Get single sign on session user This is the equivalent of logging out of the single sign on session
39 40 41 42 |
# File 'lib/ultracart_api/api/sso_api.rb', line 39 def get_sso_session_user(opts = {}) data, _status_code, _headers = get_sso_session_user_with_http_info(opts) data end |
#get_sso_session_user_with_http_info(opts = {}) ⇒ Array<(User, Fixnum, Hash)>
Get single sign on session user This is the equivalent of logging out of the single sign on session
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/ultracart_api/api/sso_api.rb', line 48 def get_sso_session_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SsoApi.get_sso_session_user ...' end # resource path local_var_path = '/sso/session/user' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: SsoApi#get_sso_session_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sso_authorize(authorization_request, opts = {}) ⇒ SingleSignOnAuthorizeResponse
Authorize a single sign on session Starts the process of authorizing a single sign on session.
89 90 91 92 |
# File 'lib/ultracart_api/api/sso_api.rb', line 89 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#sso_authorize_with_http_info(authorization_request, opts = {}) ⇒ Array<(SingleSignOnAuthorizeResponse, Fixnum, Hash)>
Authorize a single sign on session Starts the process of authorizing a single sign on session.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/ultracart_api/api/sso_api.rb', line 99 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SsoApi.sso_authorize ...' end # verify the required parameter 'authorization_request' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'authorization_request' when calling SsoApi.sso_authorize" end # resource path local_var_path = '/sso/authorize' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SingleSignOnAuthorizeResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SsoApi#sso_authorize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sso_session_revoke(opts = {}) ⇒ nil
Revoke single sign on session This is the equivalent of logging out of the single sign on session
143 144 145 146 |
# File 'lib/ultracart_api/api/sso_api.rb', line 143 def sso_session_revoke(opts = {}) sso_session_revoke_with_http_info(opts) nil end |
#sso_session_revoke_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Revoke single sign on session This is the equivalent of logging out of the single sign on session
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/ultracart_api/api/sso_api.rb', line 152 def sso_session_revoke_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SsoApi.sso_session_revoke ...' end # resource path local_var_path = '/sso/session/revoke' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SsoApi#sso_session_revoke\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sso_token(token_request, opts = {}) ⇒ SingleSignOnTokenResponse
Exchange a single sign on code for a simple key token Called by your application after receiving the code back on the redirect URI to obtain a simple key token to make API calls with
192 193 194 195 |
# File 'lib/ultracart_api/api/sso_api.rb', line 192 def sso_token(token_request, opts = {}) data, _status_code, _headers = sso_token_with_http_info(token_request, opts) data end |
#sso_token_with_http_info(token_request, opts = {}) ⇒ Array<(SingleSignOnTokenResponse, Fixnum, Hash)>
Exchange a single sign on code for a simple key token Called by your application after receiving the code back on the redirect URI to obtain a simple key token to make API calls with
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/ultracart_api/api/sso_api.rb', line 202 def sso_token_with_http_info(token_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SsoApi.sso_token ...' end # verify the required parameter 'token_request' is set if @api_client.config.client_side_validation && token_request.nil? fail ArgumentError, "Missing the required parameter 'token_request' when calling SsoApi.sso_token" end # resource path local_var_path = '/sso/token' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(token_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SingleSignOnTokenResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SsoApi#sso_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |