Skip to content

Commit

Permalink
Updated OAuth 2.0 endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Matth-- committed Dec 27, 2021
1 parent 6451135 commit 1331986
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Service/GuzzleJWTMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private static function getAuthToken(
string $baseUrl,
string $username
): string {
$result = $client->request('POST', 'https://auth.atlassian.io/oath2/token', [
$result = $client->request('POST', 'https://oauth-2-authorization-server.services.atlassian.com/oauth2/token', [
RequestOptions::FORM_PARAMS => [
'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer',
'assertion' => JWTGenerator::generateAssertion($secret, $oauthClientId, $baseUrl, $username),
Expand Down
2 changes: 1 addition & 1 deletion src/Service/JWTGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function generateAssertion(string $secret, string $oauthClientId,
'iat' => \time(),
'exp' => \strtotime('+1 minutes'),
'tnt' => $baseUrl,
'aud' => 'https://auth.atlassian.io',
'aud' => 'https://oauth-2-authorization-server.services.atlassian.com',
];

return JWT::encode($data, $secret);
Expand Down

0 comments on commit 1331986

Please sign in to comment.