JwtHeaderContent
@objc(VSSJwtHeaderContent)
public class JwtHeaderContent : NSObject
Class representing JWT Header content
-
Represents used signature algorithm
Declaration
Swift
@objc public var algorithm: String { get }
-
Represents token type
Declaration
Swift
@objc public var type: String { get }
-
Represents content type for this JWT
Declaration
Swift
@objc public var contentType: String { get }
-
Represents identifier of public key which should be used to verify signature
Note
Can be taken from hereDeclaration
Swift
@objc public var keyIdentifier: String { get }
-
String representation
Declaration
Swift
@objc public let stringRepresentation: String
-
Initializer
Throws
Rethrows fromJSONEncoder
Declaration
Swift
@objc public init(algorithm: String = "VEDS512", type: String = "JWT", contentType: String = "virgil-jwt;v=1", keyIdentifier: String) throws
Parameters
algorithm
used signature algorithm
type
token type
contentType
content type for this JWT
keyIdentifier
identifier of public key which should be used to verify signature
-
Imports JwtHeaderContent from base64Url encoded string
Throws
- JwtHeaderContentError.base64UrlStrIsInvalid If given base64 string is invalid
- Rethrows from
JSONDecoder
Declaration
Swift
@objc public init(base64UrlEncoded: String) throws
Parameters
base64UrlEncoded
base64Url encoded string with JwtHeaderContent