You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature KnpLabs#1036 refs KnpLabs#955: deprecate Client::AUTH_* constants and replace them with AuthMethod::AUTH_* const (ipalo)
This PR was squashed before being merged into the 3.4.x-dev branch.
Discussion
----------
Contribution for KnpLabs#955
Commits
-------
11c2d9f refs KnpLabs#955: deprecate Client::AUTH_* constants and replace them with AuthMethod::AUTH_* const
f4774d0 refs KnpLabs#955: revert the Client::AUTH_* deletion (BC)
e7f1ab9 refs KnpLabs#955: fix CR issues
c9cf54e refs KnpLabs#955: add upgrade to v4.0 notes
ec6656c refs KnpLabs#955: set public all constants
The required value of `$password` depends on the chosen `$method`. For `Github\Client::AUTH_ACCESS_TOKEN`, `Github\Client::AUTH_ACCESS_TOKEN` and
25
-
`Github\Client::JWT` methods you should provide the API token in `$usernameOrToken` variable (`$password` is omitted in
24
+
The required value of `$password` depends on the chosen `$method`. For `Github\AuthMethod::CLIENT_ID`, `Github\AuthMethod::ACCESS_TOKEN` and
25
+
`Github\AuthMethod::JWT` methods you should provide the API token in `$usernameOrToken` variable (`$password` is omitted in
26
26
this particular case).
27
27
28
-
The `Github\Client::AUTH_JWT` authentication method sends the specified JSON Web Token in an Authorization header.
28
+
The `Github\AuthMethod::JWT` authentication method sends the specified JSON Web Token in an Authorization header.
29
29
30
30
After executing the `$client->authenticate($usernameOrToken, $secret, $method);` method using correct credentials, all
31
31
further requests are done as the given user.
32
32
33
33
### Authenticating as an Integration
34
34
35
-
To authenticate as an integration you need to supply a JSON Web Token with `Github\Client::AUTH_JWT` to request
36
-
and installation access token which is then usable with `Github\Client::AUTH_ACCESS_TOKEN`. [Github´s integration
35
+
To authenticate as an integration you need to supply a JSON Web Token with `Github\AuthMethod::JWT` to request
36
+
and installation access token which is then usable with `Github\AuthMethod::ACCESS_TOKEN`. [Github´s integration
37
37
authentication docs](https://developer.github.com/apps/building-github-apps/authentication-options-for-github-apps/#authenticating-as-a-github-app) describe the flow in detail.
38
38
It´s important for integration requests to use the custom Accept header `application/vnd.github.machine-man-preview`.
0 commit comments