com.vmware.oauth2 package

Submodules

com.vmware.oauth2.errors_client module

The com.vmware.oauth2.errors_client module provides the OAuth 2.0 exceptions that can be included in the list of exceptions in the specification of OAuth 2.0 methods to indicate that the method might report those exceptions.

exception com.vmware.oauth2.errors_client.Error(error=None, error_description=None, error_uri=None)

Bases: VapiError

The OAuth2 Error describes the attributes common to standard OAuth 2.0 exceptions.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • error (Error.Type) – Discriminator field to help API consumers identify the structure type.

  • error_description (str or None) – Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred. Values for the “error_description” parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E. if no additional information is available.

  • error_uri (str or None) – A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. if no such web-page is available.

class Type(string)

Bases: Enum

Enumeration of OAuth 2.0 exceptions.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:

string (str) – String value for the Type instance.

invalid_client = Type(string='invalid_client')

Discriminator for the InvalidClient type. This class attribute was added in vSphere API 8.0.3.0.

invalid_grant = Type(string='invalid_grant')

Discriminator for the InvalidGrant type.

invalid_request = Type(string='invalid_request')

Discriminator for the InvalidRequest type.

invalid_scope = Type(string='invalid_scope')

Discriminator for the InvalidScope type.

invalid_target = Type(string='invalid_target')

Discriminator for the InvalidTarget type. This class attribute was added in vSphere API 8.0.3.0.

unauthorized_client = Type(string='unauthorized_client')

Discriminator for the UnauthorizedClient type. This class attribute was added in vSphere API 8.0.3.0.

unsupported_grant_type = Type(string='unsupported_grant_type')

Discriminator for the UnsupportedGrantType type. This class attribute was added in vSphere API 8.0.3.0.

exception com.vmware.oauth2.errors_client.InvalidClient(error='INVALID_CLIENT', error_description=None, error_uri=None, challenge=None)

Bases: Error

Indicates that the client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method). This class was added in vSphere API 8.0.3.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • error (Error.Type) – Discriminator field to help API consumers identify the structure type.

  • error_description (str or None) – Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred. Values for the “error_description” parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E. if no additional information is available.

  • error_uri (str or None) – A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. if no such web-page is available.

  • challenge (str) – Authentication header as defined in RFC 9110, Section 11.6.1 - WWW-Authenticate. The “WWW-Authenticate” response header field indicates the authentication scheme(s) and parameters applicable to the target resource. This attribute was added in vSphere API 8.0.3.0.

exception com.vmware.oauth2.errors_client.InvalidGrant(error='INVALID_GRANT', error_description=None, error_uri=None)

Bases: Error

Indicates that the provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • error (Error.Type) – Discriminator field to help API consumers identify the structure type.

  • error_description (str or None) – Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred. Values for the “error_description” parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E. if no additional information is available.

  • error_uri (str or None) – A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. if no such web-page is available.

exception com.vmware.oauth2.errors_client.InvalidRequest(error='INVALID_REQUEST', error_description=None, error_uri=None)

Bases: Error

Indicates that the request is missing a required parameter, includes an unsupported parameter value (other than grant type), repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • error (Error.Type) – Discriminator field to help API consumers identify the structure type.

  • error_description (str or None) – Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred. Values for the “error_description” parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E. if no additional information is available.

  • error_uri (str or None) – A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. if no such web-page is available.

exception com.vmware.oauth2.errors_client.InvalidScope(error='INVALID_SCOPE', error_description=None, error_uri=None)

Bases: Error

Indicates that the requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • error (Error.Type) – Discriminator field to help API consumers identify the structure type.

  • error_description (str or None) – Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred. Values for the “error_description” parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E. if no additional information is available.

  • error_uri (str or None) – A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. if no such web-page is available.

exception com.vmware.oauth2.errors_client.InvalidTarget(error='INVALID_TARGET', error_description=None, error_uri=None)

Bases: Error

Indicates that the authorization server is unwilling or unable to issue a token for any target service. This class was added in vSphere API 8.0.3.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • error (Error.Type) – Discriminator field to help API consumers identify the structure type.

  • error_description (str or None) – Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred. Values for the “error_description” parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E. if no additional information is available.

  • error_uri (str or None) – A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. if no such web-page is available.

class com.vmware.oauth2.errors_client.StubFactory(stub_config)

Bases: StubFactoryBase

Initialize StubFactoryBase

Parameters:

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

exception com.vmware.oauth2.errors_client.UnauthorizedClient(error='UNAUTHORIZED_CLIENT', error_description=None, error_uri=None)

Bases: Error

Indicates that the authenticated client is not authorized to use this authorization grant type. This class was added in vSphere API 8.0.3.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • error (Error.Type) – Discriminator field to help API consumers identify the structure type.

  • error_description (str or None) – Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred. Values for the “error_description” parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E. if no additional information is available.

  • error_uri (str or None) – A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. if no such web-page is available.

exception com.vmware.oauth2.errors_client.UnsupportedGrantType(error='UNSUPPORTED_GRANT_TYPE', error_description=None, error_uri=None)

Bases: Error

Indicates that the authorization grant type is not supported by the authorization server. This class was added in vSphere API 8.0.3.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • error (Error.Type) – Discriminator field to help API consumers identify the structure type.

  • error_description (str or None) – Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred. Values for the “error_description” parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E. if no additional information is available.

  • error_uri (str or None) – A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. if no such web-page is available.