(auth)
- introspect - Introspect an Access Token
- retrieve - Retrieve an Access Token
- retrieve_info - Retrieve info for the Access Token
- revoke - Revoke an Access Token
Introspect an OAuth 2 Access Token using another Access Token.
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
Shared::OAuth2IntrospectRequest | ✔️ | The request object to use for the request. |
T.nilable(Operations::IntrospectTokenResponse)
Retrieve an OAuth 2 Access Token.
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
Shared::OAuth2ClientCredentialsRequest | ✔️ | The request object to use for the request. |
T.nilable(Operations::RetrieveTokenResponse)
Retrieve an OAuth 2 Access Token information.
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
T.nilable(Operations::RetrieveInfoResponse)
Introspect an OAuth 2 Access Token using another Access Token.
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
Shared::OAuth2TokenRevokeRequest | ✔️ | The request object to use for the request. |