Skip to content

Commit

Permalink
Merge pull request #3 from jefersonralmeida/main
Browse files Browse the repository at this point in the history
Ability to inject the authorization URL through the constructor
  • Loading branch information
greew authored Apr 3, 2024
2 parents 025c9ca + 8d52921 commit 7a00467
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Provider/Azure.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,25 @@ class Azure extends AbstractProvider
*
* @var string
*/
protected $urlAuthorize = 'https://login.microsoftonline.com';
protected $urlAuthorize;

/** @var string */
protected $urlResourceOwnerDetails = 'https://graph.microsoft.com/v1.0/me';

/**
* @param array $options
* @param array $collaborators
* @param string $urlAuthorize Base url for authorization.
*/
public function __construct(
array $options = [],
array $collaborators = [],
string $urlAuthorize = 'https://login.microsoftonline.com'
) {
$this->urlAuthorize = $urlAuthorize;
parent::__construct($options, $collaborators);
}

/**
* Get authorization url to begin OAuth flow
*
Expand Down

0 comments on commit 7a00467

Please sign in to comment.