OAuth2ServerError
public struct OAuth2ServerError
extension OAuth2ServerError: SAPError
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 of 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?
-
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 astate
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 of 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
-
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.
-
Declaration
Swift
public var description: String { get }
-
A localized message describing the debug information.
Declaration
Swift
public var debugDescription: String { get }
-
A localized message describing what error occurred.
Declaration
Swift
public var errorDescription: String? { get }
-
A localized message describing the reason for the failure.
Declaration
Swift
public var failureReason: String? { get }