AzureAuth (version 1.1.0)

cert_assertion: Create a client assertion for certificate authentication

Description

Create a client assertion for certificate authentication

Usage

cert_assertion(certificate, duration = 3600, signature_size = 256, ...)

Arguments

certificate

An Azure Key Vault certificate object, or the name of a PEM or PFX file containing both a private key and a public certificate.

duration

The requested validity period of the token, in seconds. The default is 1 hour.

signature_size

The size of the SHA2 signature.

...

Other named arguments which will be treated as custom claims.

Value

An object of S3 class cert_assertion, which is a list representing the assertion.

Details

Use this function to customise a client assertion for authenticating with a certificate.

See Also

get_azure_token

Examples

Run this code
# NOT RUN {
cert_assertion("mycert.pem", duration=2*3600)
cert_assertion("mycert.pem", custom_data="some text")

# using a cert stored in Azure Key Vault
cert <- AzureKeyVault::key_vault("myvault")$certificates$get("mycert")
cert_assertion(cert, duration=2*3600)

# }

Run the code above in your browser using DataCamp Workspace