Skip to content

Verify token provided by AzureAD with V2 endpoint (compatible with nonce property)

Notifications You must be signed in to change notification settings

d-corler/azure-token-nonce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure token nonce

License

Verify token provided by AzureAD with V2 endpoint (compatible with nonce property)

Installation

With NPM :

npm install azure-token-nonce

With Yarn :

yarn azure-token-nonce

Usage

Configuration

import { AzureTokenNonce } from 'azure-token-nonce';

AzureTokenNonce.configure({
    tenantId: 'xxx',
    clientId: 'xxx',
    kid: 'xxx',
});
Property Type Required Description
tenantId string true Unique identifier of your tenant
clientId string true Unique identifier of your client
kid string true Unique identifier of signing key (decode your token to retrieve it)
issuer string false Overwrite issuer (default : https://sts.windows.net/<TENANT_ID>/)
jsonwebtoken jsonwebtoken.VerifyOptions false Additional properties for "jsonwebtoken" library
jwksClient jwksClient.ClientOptions false Overwrite configuration of jwks client

Verify

// Express request as argument
await AzureTokenNonce.verifyToken(req);

🤝 Contributing

Contributions, issues and feature requests are welcome!

📝 License

This project is under MIT, feel free to fork.

About

Verify token provided by AzureAD with V2 endpoint (compatible with nonce property)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published