Leverage cross-language libraries for seamless token refresh in Entra ID–authenticated applications.
Entra ID (formerly Azure Active Directory) is a widely adopted identity platform for securing access to cloud applications and services. It uses a token-based authentication mechanism involving access tokens and refresh tokens to manage secure connections.
This open-source project provides libraries in Python, Java, C#, and JavaScript to automatically handle token expiration and refresh, ensuring uninterrupted connectivity to services like Azure Database for PostgreSQL Flexible Server.
-
Token Validation: Token validation before use and acquisition of new token if current token is invalid
-
Connection Pool Integration: Token validation extends to new connections being created for connection pool
-
Plug-in ecosystem: Pluggable architecture for different languages and frameworks
- Python
- C#
- JavaScript
- Java (see note below)
This repository is organized by programming language, with each language having its own dedicated folder:
├── dotnet/ # .NET implementation
│ ├── src/ # Source code
│ ├── samples/ # Code samples and examples
│ ├── tests/ # Integration tests
│ └── README.md # .NET-specific documentation
├── python/ # Python implementation
│ ├── src/ # Source code
│ ├── samples/ # Code samples and examples
│ ├── tests/ # Integration tests
│ └── README.md # Python-specific documentation
└── javascript/ # JavaScript implementation
├── src/ # Source code
├── samples/ # Code samples and examples
├── tests/ # Integration tests
└── README.md # JavaScript-specific documentation
Note: Java samples have been moved to a separate repository: Azure-Samples/Access-token-refresh-samples
Getting Started: Navigate to the folder for your preferred programming language to find source code, usage examples, and language-specific documentation:
- .NET Documentation & Samples
- Python Documentation & Samples
- JavaScript Documentation & Samples
- Java Samples
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.
This project is licensed under the MIT License.