Skip to content

Latest commit

 

History

History
executable file
·
183 lines (112 loc) · 5.83 KB

README.md

File metadata and controls

executable file
·
183 lines (112 loc) · 5.83 KB

Auth

(auth)

Available Operations

introspect

Introspect an OAuth 2 Access Token using another Access Token.

Example Usage

require_relative easyship_ruby_sdk


s = Easyship::Api.new
s.config_security(
  security=Shared::Security.new(
    o_auth2="",
  )
)

   
req = Shared::OAuth2IntrospectRequest.new(
  request=Shared::OAuth2IntrospectRequest.new(
    token="string",
  ),
)
    
res = s.auth.introspect(req)

if ! res.o_auth2_introspect_response.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Shared::OAuth2IntrospectRequest ✔️ The request object to use for the request.

Response

T.nilable(Operations::IntrospectTokenResponse)

retrieve

Retrieve an OAuth 2 Access Token.

Example Usage

require_relative easyship_ruby_sdk


s = Easyship::Api.new
s.config_security(
  security=Shared::Security.new(
    o_auth2="",
  )
)

   
req = Shared::OAuth2ClientCredentialsRequest.new(
  request=Shared::OAuth2ClientCredentialsRequest.new(
    client_id="string",
    client_secret="string",
    grant_type=Shared::OAuth2ClientCredentialsRequestGrantType::CLIENT_CREDENTIALS,
    scope="string",
  ),
)
    
res = s.auth.retrieve(req)

if ! res.o_auth2_token_response.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Shared::OAuth2ClientCredentialsRequest ✔️ The request object to use for the request.

Response

T.nilable(Operations::RetrieveTokenResponse)

retrieve_info

Retrieve an OAuth 2 Access Token information.

Example Usage

require_relative easyship_ruby_sdk


s = Easyship::Api.new
s.config_security(
  security=Shared::Security.new(
    o_auth2="",
  )
)

    
res = s.auth.retrieve_info()

if ! res.o_auth2_token_info.nil?
  # handle response
end

Response

T.nilable(Operations::RetrieveInfoResponse)

revoke

Introspect an OAuth 2 Access Token using another Access Token.

Example Usage

require_relative easyship_ruby_sdk


s = Easyship::Api.new
s.config_security(
  security=Shared::Security.new(
    o_auth2="",
  )
)

   
req = Shared::OAuth2TokenRevokeRequest.new(
  request=Shared::OAuth2TokenRevokeRequest.new(
    client_id="string",
    client_secret="string",
    grant_type=Shared::GrantType::CLIENT_CREDENTIALS,
    token="string",
  ),
)
    
res = s.auth.revoke(req)

if ! res.revoke_access_token_response.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Shared::OAuth2TokenRevokeRequest ✔️ The request object to use for the request.

Response

T.nilable(Operations::RevokeTokenResponse)