Payload
public struct Payload
Represents the payload section of a JWT object. Use the exposed properties to get claims from the
payload. Use the subscript
method to get any unexposed values.
-
Gets values from the current payload.
Declaration
Swift
public subscript<T>(key: String, type: T.Type) -> T? { get }
Parameters
key
The string key of a claim.
type
The expected type for
key
. The value forkey
will be converted to the specified type. Use JSON compatible types only. -
The issuer claim of the ID token. The issuer of ID tokens from the LINE Platform is always “https://access.line.me”.
Declaration
Swift
public var issuer: String? { get }
-
The subject claim of the ID token. The subject of ID tokens from the LINE Platform is the user ID of the authorized user.
Declaration
Swift
public var subject: String? { get }
-
The audience claim of the ID token. The audience of ID tokens from the LINE Platform is the channel ID of your app.
Declaration
Swift
public var audience: String? { get }
-
The expiration time of the ID token.
Declaration
Swift
public var expiration: Date? { get }
-
The issued time of the ID token.
Declaration
Swift
public var issueAt: Date? { get }
-
The authentication methods references of the ID token.
Declaration
Swift
public var amr: [String]? { get }
-
The user’s display name. Not included if the
.profile
permission was not specified in the authorization request.Declaration
Swift
public var name: String? { get }
-
The user’s profile image URL. Not included if the
.profile
permission was not specified in the authorization request.Declaration
Swift
public var pictureURL: URL? { get }
-
The user’s email address. Not included if the
.email
permission was not specified in the authorization request.Declaration
Swift
public var email: String? { get }