Skip to content

Commit

Permalink
fix documentation for #271
Browse files Browse the repository at this point in the history
  • Loading branch information
bodewig committed Jul 9, 2019
1 parent 0f05ec7 commit d7712be
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,6 @@ h2JHukolz9xf6qN61QMLSd83+kwoBr2drp6xg3eGDLIkQCQLrkY=
-- https_proxy = "http://<proxy_host>:<proxy_port>/"
-- }
-- behavior if the request is not known to be authenticated or the session or the access token have expired:
-- be default this results in a redirect to the OpenID Connect Provider' authorization endpoint
-- this can be overridden via the unauth_action option:
-- allow the request to proceed anyway
-- unauth_action = 'pass'
-- deny the request right away (results in authenticate returning an error)
-- unauth_action = 'deny'
-- Lifecycle Hooks
--
-- lifecycle = {
Expand Down Expand Up @@ -291,6 +283,13 @@ h2JHukolz9xf6qN61QMLSd83+kwoBr2drp6xg3eGDLIkQCQLrkY=
local res, err = require("resty.openidc").authenticate(opts, nil, "pass")
```

## Check authentication only and deny unauthenticated access

```
-- check session, do not redirect to auth if not already logged in but return an error instead
local res, err = require("resty.openidc").authenticate(opts, nil, "deny")
```

## Sample Configuration for OAuth 2.0 JWT Token Validation

Sample `nginx.conf` configuration for verifying Bearer JWT Access Tokens against a pre-configured secret/key.
Expand Down

0 comments on commit d7712be

Please sign in to comment.