Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Identity Laravel Package

azure-oss/identity

A PHP identity library for acquiring Microsoft Entra ID access tokens via client secret, client certificate, workload identity, managed identity, chained, and default credential flows. Uses PSR-18/17 HTTP implementations. Community-maintained and not affiliated with Microsoft.

View on GitHub
Deep Wiki
Context7

Azure Identity PHP

Latest Version on Packagist Packagist Downloads

A PHP identity library for acquiring Microsoft Entra ID access tokens with client secret, client certificate, workload identity, managed identity, and default credential flows.

[!IMPORTANT] This package is community-maintained and is not affiliated with, endorsed by, or supported by Microsoft.

Install

composer require azure-oss/identity

Quickstart

<?php

use AzureOss\Identity\ClientSecretCredential;
use AzureOss\Identity\TokenRequestContext;

$credential = new ClientSecretCredential(
    tenantId: getenv('AZURE_TENANT_ID'),
    clientId: getenv('AZURE_CLIENT_ID'),
    clientSecret: getenv('AZURE_CLIENT_SECRET'),
);

$token = $credential->getToken(
    new TokenRequestContext(['https://storage.azure.com/.default'])
);

echo $token->token;

Credentials

  • ClientSecretCredential
  • ClientCertificateCredential
  • EnvironmentCredential
  • WorkloadIdentityCredential
  • ManagedIdentityCredential
  • ChainedTokenCredential
  • DefaultAzureCredential

Notes

  • DefaultAzureCredential tries a configurable credential chain for common Azure hosting environments.
  • By default, DefaultAzureCredential includes environment and workload identity credentials. Managed identity can be enabled through DefaultAzureCredentialOptions.
  • The package depends on PSR-18 and PSR-17 interfaces and will use discovered implementations when available.

Documentation

You can read the documentation here.

Related packages

Maintenance

This package is part of the community-maintained PHP OSS for Azure project. It is an independent project and is not affiliated with or endorsed by Microsoft.

License

This project is released under the MIT License. See LICENSE for details.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route