CLASS

Dpop

Contents

@objcMembers public class Dpop: NSObject

The Dpop class represents the context used for the Demonstrating Proof of Possession protocol used for authenticating requests that prove ownership of a private key

Properties

jwkThumbprint

public let jwkThumbprint: String

The JWK Thumbprint of the DPoP public key

Methods

createProof(httpMethod:url:)

public func createProof(httpMethod: String, url: URL) throws -> String

Create a DPoP proof token (a signed JWT) for the provided HTTP-method and URL. To sign the JWT, the cryptographic key of the Dpop context is used.

Parameters

Name Description
httpMethod the HTTP method of the request to authenticate
url the URL of the request to authenticate

getHeaderValue(httpMethod:url:)

public func getHeaderValue(httpMethod: String, url: URL) throws -> String

Calculate the DPoP request header value that can be used to authenticate a request of url by httpMethod