IDPChallengeSession
public struct IDPChallengeSession : ChallengeSession, Codable
extension IDPChallengeSession: Equatable
All relevant constraints needed for a successful challenge exchange
-
The verified challenge
Declaration
Swift
public let challenge: IDPChallenge -
The verifier code used to request the
challengeDeclaration
Swift
public let verifierCode: VerifierCode -
The state used for request the challenge
Declaration
Swift
public let state: String -
A random string used for requesting the challenge
Declaration
Swift
public let nonce: String -
Initialize an IDP Challenge session
Declaration
Swift
public init(challenge: IDPChallenge, verifierCode: VerifierCode, state: String, nonce: String)Parameters
challengeThe challenge that should have been verified before
verifierCodeThe verifier code used to start the challenge session
stateState used for requesting the challenge
nonceNonce used for requesting the challenge
-
Create the signed IDPChallenge response JWT
Declaration
Swift
public func sign( with signer: JWTSigner, using certificates: [Data], alg: JWT.Algorithm = .bp256r1, jsonEncoder _: JSONEncoder = JSONEncoder() ) -> AnyPublisher<SignedChallenge, Swift.Error>Parameters
signerJWT Signature provider
certificatesX.509 DER encoded certificate chain
algsignature algorithm. Default: “BP256R1”
Return Value
signed JWT
-
Declaration
Swift
public func validateState(with state: String) -> Bool -
Declaration
Swift
public func validateNonce(with idToken: String) throws -> Bool
View on GitHub
IDPChallengeSession Structure Reference