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
Copy file name to clipboardExpand all lines: README.md
+28-2
Original file line number
Diff line number
Diff line change
@@ -239,7 +239,6 @@ The command line to run `oauth2_proxy` in this configuration would look like thi
239
239
--client-secret=...
240
240
```
241
241
242
-
243
242
## Endpoint Documentation
244
243
245
244
OAuth2 Proxy responds directly to the following endpoints. All other endpoints will be proxied upstream when authenticated. The `/oauth2` prefix can be changed with the `--proxy-prefix` config variable.
@@ -249,7 +248,7 @@ OAuth2 Proxy responds directly to the following endpoints. All other endpoints w
249
248
* /oauth2/sign_in - the login page, which also doubles as a sign out page (it clears cookies)
250
249
* /oauth2/start - a URL that will redirect to start the OAuth cycle
251
250
* /oauth2/callback - the URL used at the end of the OAuth cycle. The oauth app will be configured with this as the callback url.
252
-
* /oauth2/auth - only returns a 202 Accepted response or a 401 Unauthorized response; for use with the [Nginx `auth_request` directive](http://nginx.org/en/docs/http/ngx_http_auth_request_module.html)
251
+
* /oauth2/auth - only returns a 202 Accepted response or a 401 Unauthorized response; for use with the [Nginx `auth_request` directive](#nginx-auth-request)
253
252
254
253
## Logging Format
255
254
@@ -266,3 +265,30 @@ Follow the examples in the [`providers` package](providers/) to define a new
266
265
`Provider` instance. Add a new `case` to
267
266
[`providers.New()`](providers/providers.go) to allow `oauth2_proxy` to use the
268
267
new `Provider`.
268
+
269
+
## <aname="nginx-auth-request"></a>Configuring for use with the Nginx `auth_request` directive
270
+
271
+
The [Nginx `auth_request` directive](http://nginx.org/en/docs/http/ngx_http_auth_request_module.html) allows Nginx to authenticate requests via the oauth2_proxy's `/auth` endpoint, which only returns a 202 Accepted response or a 401 Unauthorized response without proxying the request through. For example:
0 commit comments