SignedChallenge

public struct SignedChallenge
extension SignedChallenge: Equatable

Model that holds a challenge and its signed counterpart

  • Original challenge

    Declaration

    Swift

    public let originalChallenge: IDPChallengeSession
  • Signed challenge

    Declaration

    Swift

    public let signedChallenge: JWT
  • Initialize a SignedChallenge

    Declaration

    Swift

    public init(originalChallenge: IDPChallengeSession, signedChallenge: JWT)

    Parameters

    originalChallenge

    original challenge

    signedChallenge

    signed response

  • Serialize the signedChallenge

    Declaration

    Swift

    public func serialize() -> String

    Return Value

    ASCII Encoded String

  • Encrypt the signed challenge using the provided public key

    Throws

    IDPError if encryption fails

    Declaration

    Swift

    public func encrypt(with publicKey: BrainpoolP256r1.KeyExchange.PublicKey,
                        using cryptoBox: IDPCrypto) throws -> JWE

    Parameters

    publicKey

    BrainpoolP256r1 public key for encryption

    cryptoBox

    IDPCrypto instance containing encryption parameters

    Return Value

    JWE containing the encrypted signed challenge