@@ -102,34 +102,34 @@ composer require pelmered/laravel-http-client-auth-helper
102
102
103
103
## Options reference
104
104
105
- #### scopes - ` array `
105
+ ### scopes - ` array `
106
106
Scopes to send when requesting an access token.
107
107
Typically only used for OAuth2 flows.\
108
108
** Possible options:** array with strings
109
109
** Default:** ` [] `
110
110
111
- #### authType - ` string `
111
+ ### authType - ` string `
112
112
The type of authorization for the refresh token request.\
113
113
** Possible options:** ` Credentials::AUTH_TYPE_BEARER ` , ` Credentials::AUTH_TYPE_BODY ` , ` Credentials::AUTH_TYPE_QUERY ` , ` Credentials::AUTH_TYPE_BASIC ` , ` Credentials::AUTH_TYPE_CUSTOM ` ,\
114
114
** Default:** ` Credentials::AUTH_TYPE_BEARER ` (=` 'Bearer' ` )
115
115
116
- #### grantType - ` string `
116
+ ### grantType - ` string `
117
117
Grant type for OAuth2 flows.
118
118
** Possible options:** ` Credentials::GRANT_TYPE_CLIENT_CREDENTIALS ` , ` Credentials::GRANT_TYPE_PASSWORD_CREDENTIALS ` (authorization_code and implicit grants are not yet supported. See [ issue #3 ] ( https://github.com/pelmered/laravel-http-client-auth-helper/issues/3 ) )
119
119
** Default:** ` Credentials::GRANT_TYPE_CLIENT_CREDENTIALS ` (=` 'client_credentials' ` )
120
120
121
- #### tokenType - ` string `
121
+ ### tokenType - ` string `
122
122
How the access token should be applied to all subsequent requests.
123
123
124
124
** Possible options:** ` AccessToken::TOKEN_TYPE_BEARER ` ,` AccessToken::TOKEN_TYPE_QUERY ` ,` AccessToken::TOKEN_TYPE_CUSTOM ` ,
125
125
** Default:** ` AccessToken::TOKEN_TYPE_BEARER ` (=` 'Bearer' ` )
126
126
127
- #### tokenName - ` string `
127
+ ### tokenName - ` string `
128
128
The name of the token field. This only applies for when the token is applied as a query parameter or to the body of the request.
129
129
** Possible options:** Any string
130
130
** Default:** ` 'token' `
131
131
132
- #### expires - ` int|string|Closure|Carbon `
132
+ ### expires - ` int|string|Closure|Carbon `
133
133
This determines when the access token expires.\
134
134
** Possible options:** \
135
135
integer - for how long until expiry in seconds)\
@@ -138,26 +138,26 @@ Closure - A closure that receives the refresh response and can return any other
138
138
Carbon - A Carbon object with the time of the expiry.\
139
139
** Default:** 3600
140
140
141
- #### accessToken - ` string|Closure `
141
+ ### accessToken - ` string|Closure `
142
142
This is where the access token can be found on the refresh response.\
143
143
** Possible options:** \
144
144
string - The key of the access token in the refresh response.\
145
145
Closure - A closure that receives the refresh response and should return the token as a string.\
146
146
** Default:** ` 'access_token' `
147
147
148
- #### tokenTypeCustomCallback - ` ?Closure `
148
+ ### tokenTypeCustomCallback - ` ?Closure `
149
149
A callback for giving dull control of how the authentication should be applied.
150
150
The closure receives the Http client and should return a new Http Client where the auth information has been appended.\
151
151
** Possible options:** \ Any closure that returns a Http Client (` Illuminate\Http\Client\PendingRequest ` ).\
152
152
** Default:** ` null `
153
153
154
- #### cacheKey - ` ?string `
154
+ ### cacheKey - ` ?string `
155
155
The cache key that should be used to save the access tokens.
156
156
If left empty, it will be generated based on the refresh URL.\
157
157
** Possible options:** \
158
158
** Default:** ` null `
159
159
160
- #### cacheDriver - ` ?string `
160
+ ### cacheDriver - ` ?string `
161
161
The cache driver/store that should be used for storing the access tokens.
162
162
If left empty, the Laravel default will be used.\
163
163
** Possible options:** \
0 commit comments