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
errorparameter 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_descriptionparameter 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? -
The OAuth error description as specified by the
error_uriparameter 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
stateparameter in the returned JSON. If astateparameter 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
codeThe OAuth2 error code as specified by the
errorparameter in the returned JSON. Defines the type if error that occurred.messageThe OAuth2 error description as specified by the
error_descriptionparameter in the returned JSON. This message provides additional information, used to assist the client developer in understanding the error that occurred.uriThe OAuth2 error description as specified by the
error_uriparameter 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 -
Initializer for responsed data
Declaration
Swift
public init(data: Data)Parameters
dataThe raw data returned by the server. Should contain the error object in JSON format.