IdToken
class IdToken : Equatable
Represents the id token obtained via the AppAuth framework.
-
Header of the id token
Declaration
Swift
private let header: IdTokenHeader
-
Payload of the id token
Declaration
Swift
private let payload: IdTokenPayload
-
Signature of the id token
Declaration
Swift
private let signature: String
-
Variable indicates the correctness of the id token structure
Declaration
Swift
private let isWellFormedToken: Bool
-
Initialises IdToken object
Declaration
Swift
init(header: IdTokenHeader, payload: IdTokenPayload, signature: String, isWellFormedToken: Bool)
Parameters
header
id token header
payload
id token payload
signature
id token signature
isWellFormedToken
correctness of the id token structure
-
Gets the data about token structure validness
The token structure is valid if the token string consists of header, payload and signature separated with dots.
Declaration
Swift
func isWellFormed() -> Bool
Return Value
Boolean value, true if the token has valid structure, false otherwise.
-
Function provides IdTokenHeader
Declaration
Swift
func getHeader() -> IdTokenHeader
Return Value
the [IdTokenHeader]
-
Function provides IdTokenPayload
Declaration
Swift
func getPayload() -> IdTokenPayload
Return Value
the [IdTokenPayload]
-
Function provides id token signature
Declaration
Swift
func getSignature() -> String
Return Value
the token signature.
-
Implementation of the [Equatable] protocol, to be able to compare [IdToken] objects.
Declaration
Swift
static func == (lhs: IdToken, rhs: IdToken) -> Bool
Parameters
lhs
first IdToken object
rhs
second IdToken object
Return Value
Boolean value, true if the objects are equal, false otherwise.