Skip to content

Commit 5031877

Browse files
atymicgithub-actions[bot]
authored andcommitted
Fix code styling
1 parent 64e6dfd commit 5031877

File tree

1 file changed

+55
-55
lines changed

1 file changed

+55
-55
lines changed

Provider.php

+55-55
Original file line numberDiff line numberDiff line change
@@ -35,60 +35,60 @@ protected function getTokenUrl(): string
3535
return 'https://developer.api.autodesk.com/authentication/v2/token';
3636
}
3737

38-
/**
39-
* {@inheritdoc}
40-
*/
41-
protected function getCodeFields($state = null)
42-
{
43-
$fields = [
44-
'client_id' => $this->getConfig('client_id') ?? $this->clientId,
45-
'redirect_uri' => $this->getConfig('redirect') ?? $this->redirectUrl,
46-
'scope' => $this->formatScopes($this->getScopes(), $this->scopeSeparator),
47-
'response_type' => 'code',
48-
];
49-
50-
if ($this->usesState()) {
51-
$fields['state'] = $state;
52-
}
53-
54-
if ($this->usesPKCE()) {
55-
$fields['code_challenge'] = $this->getCodeChallenge();
56-
$fields['code_challenge_method'] = $this->getCodeChallengeMethod();
57-
}
58-
59-
return array_merge($fields, $this->parameters);
60-
}
61-
62-
/**
63-
* {@inheritdoc}
64-
*/
65-
protected function getTokenFields($code)
66-
{
67-
$fields = [
68-
'grant_type' => 'authorization_code',
69-
'code' => $code,
70-
'redirect_uri' => $this->getConfig('redirect') ?? $this->redirectUrl,
71-
];
72-
73-
if ($this->usesPKCE()) {
74-
$fields['code_verifier'] = $this->request->session()->pull('code_verifier');
75-
}
76-
77-
return array_merge($fields, $this->parameters);
78-
}
79-
80-
81-
/**
82-
* {@inheritdoc}
83-
*/
84-
protected function getTokenHeaders($code): array
85-
{
86-
$base64 = base64_encode(($this->getConfig('client_id') ?? $this->clientId).':'.($this->getConfig('client_secret') ?? $this->clientSecret));
87-
return [
88-
'Content-Type' => 'application/x-www-form-urlencoded',
89-
'Authorization' => 'Basic '.$base64,
90-
];
91-
}
38+
/**
39+
* {@inheritdoc}
40+
*/
41+
protected function getCodeFields($state = null)
42+
{
43+
$fields = [
44+
'client_id' => $this->getConfig('client_id') ?? $this->clientId,
45+
'redirect_uri' => $this->getConfig('redirect') ?? $this->redirectUrl,
46+
'scope' => $this->formatScopes($this->getScopes(), $this->scopeSeparator),
47+
'response_type' => 'code',
48+
];
49+
50+
if ($this->usesState()) {
51+
$fields['state'] = $state;
52+
}
53+
54+
if ($this->usesPKCE()) {
55+
$fields['code_challenge'] = $this->getCodeChallenge();
56+
$fields['code_challenge_method'] = $this->getCodeChallengeMethod();
57+
}
58+
59+
return array_merge($fields, $this->parameters);
60+
}
61+
62+
/**
63+
* {@inheritdoc}
64+
*/
65+
protected function getTokenFields($code)
66+
{
67+
$fields = [
68+
'grant_type' => 'authorization_code',
69+
'code' => $code,
70+
'redirect_uri' => $this->getConfig('redirect') ?? $this->redirectUrl,
71+
];
72+
73+
if ($this->usesPKCE()) {
74+
$fields['code_verifier'] = $this->request->session()->pull('code_verifier');
75+
}
76+
77+
return array_merge($fields, $this->parameters);
78+
}
79+
80+
/**
81+
* {@inheritdoc}
82+
*/
83+
protected function getTokenHeaders($code): array
84+
{
85+
$base64 = base64_encode(($this->getConfig('client_id') ?? $this->clientId).':'.($this->getConfig('client_secret') ?? $this->clientSecret));
86+
87+
return [
88+
'Content-Type' => 'application/x-www-form-urlencoded',
89+
'Authorization' => 'Basic '.$base64,
90+
];
91+
}
9292

9393
/**
9494
* @param string $token
@@ -118,7 +118,7 @@ protected function getUserByToken($token): array
118118
*/
119119
protected function mapUserToObject(array $user): User
120120
{
121-
return (new User())->setRaw($user)->map([
121+
return (new User)->setRaw($user)->map([
122122
'id' => $user['sub'],
123123
'email' => $user['email'],
124124
'email_verified' => $user['email_verified'],

0 commit comments

Comments
 (0)