cert_assertion: Create a client assertion for certificate authentication

Description Usage Arguments Details Value See Also Examples

View source: R/cert_creds.R

Description

Create a client assertion for certificate authentication

Usage

1
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.

Details

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

Value

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

See Also

get_azure_token

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)


## End(Not run)

AzureAuth documentation built on Sept. 13, 2021, 5:06 p.m.