OAuth2ServerError

public struct OAuth2ServerError

Struct to detail the server responsed error

  • The raw data returned by the server.

    Declaration

    Swift

    public let responseData: Data?
  • The OAuth error code as specified by the error parameter in the returned JSON. Defines the type if error that occurred.

    Declaration

    Swift

    public let code: String?
  • The OAuth error description as specified by the error_description parameter in the returned JSON. This message provides additional information, used to assist the client developer in understanding the error that occurred.

    Declaration

    Swift

    public let message: String?
  • uri

    The OAuth error description as specified by the error_uri parameter in the returned JSON. The URI identifies a human-readable web page with information about the error, used to provide the client developer with additional information about the error.

    Declaration

    Swift

    public let uri: String?
  • The OAuth error description as specified by the state parameter in the returned JSON. If a state parameter was present in the client authorization request, this is the exact value received from the client.

    Declaration

    Swift

    public let state: String?
  • Initializer for parsed error details

    Declaration

    Swift

    public init(code: String, message: String?, uri: String?, state: String?)

    Parameters

    code

    The OAuth2 error code as specified by the error parameter in the returned JSON. Defines the type if error that occurred.

    message

    The OAuth2 error description as specified by the error_description parameter in the returned JSON. This message provides additional information, used to assist the client developer in understanding the error that occurred.

    uri

    The OAuth2 error description as specified by the error_uri parameter in the returned JSON. The URI identifies a human-readable web page with information about the error, used to provide the client developer with additional information about the error.

    state

    The OAuth2 error description as specified by the state parameter in the returned JSON. If a state parameter was present in the client authorization request, this is the exact value received from the client.

  • Initializer for responsed data

    Declaration

    Swift

    public init(data: Data)

    Parameters

    data

    The raw data returned by the server. Should contain the error object in JSON format.