friendship ended with social-app. php is my new best friend
1<?php
2/**
3 * Class AzureActiveDirectory
4 *
5 * @created 29.07.2019
6 * @author smiley <smiley@chillerlan.net>
7 * @copyright 2019 smiley
8 * @license MIT
9 */
10declare(strict_types=1);
11
12namespace chillerlan\OAuth\Providers;
13
14use chillerlan\OAuth\Core\{CSRFToken, OAuth2Provider};
15
16/**
17 * Microsoft identity platform (OAuth2)
18 *
19 * @link https://learn.microsoft.com/en-us/entra/identity-platform/v2-app-types
20 * @link https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow
21 * @link https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow
22 */
23abstract class AzureActiveDirectory extends OAuth2Provider implements CSRFToken{
24
25 public const SCOPE_OPENID = 'openid';
26 public const SCOPE_OPENID_EMAIL = 'email';
27 public const SCOPE_OPENID_PROFILE = 'profile';
28 public const SCOPE_OFFLINE_ACCESS = 'offline_access';
29
30 protected string $authorizationURL = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize';
31 protected string $accessTokenURL = 'https://login.microsoftonline.com/common/oauth2/v2.0/token';
32 protected string|null $userRevokeURL = 'https://account.live.com/consent/Manage';
33 // phpcs:ignore
34 protected string|null $applicationURL = 'https://aad.portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps';
35
36}