Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
Documentations (#185)
Browse files Browse the repository at this point in the history
- expanding the docs on match-claims
  • Loading branch information
gambol99 authored Jan 30, 2017
1 parent 5aa4528 commit ea960a9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ just drop the client secret and use the client id and discovery-url.
#### **Claim Matching**
The proxy supports adding a variable list of claim matches against the presented tokens for additional access control. So for example you can match the 'iss' or 'aud' to the token or custom attributes; note each of the matches are regex's. Examples, --match-claims 'aud=sso.*' --claim iss=https://.*' or via the configuration file. Note, each of matches are regex's
The proxy supports adding a variable list of claim matches against the presented tokens for additional access control. So for example you can match the 'iss' or 'aud' to the token or custom attributes; note each of the matches are regex's. Examples, --match-claims 'aud=sso.*' --claim iss=https://.*' or via the configuration file. Note, each of matches are regex's.
```YAML
match-claims:
Expand All @@ -377,6 +377,14 @@ or via the CLI
--match-claims=iss=http://keycloak.example.com/realms/commons
```
Another example would be limiting the email domain permitted; say you have some google apps domain with username@example.com and want to limit only to those users.
```YAML
match-claims:
email: ^.*@example.com$
```
#### **Custom Pages**
By default the proxy will immediately redirect you for authentication and hand back 403 for access denied. Most users will probably want to present the user with a more friendly sign-in and access denied page. You can pass the command line options (or via config file) paths to the files i.e. --signin-page=PATH. The sign-in page will have a 'redirect' variable passed into the scope and holding the oauth redirection url. If you wish pass additional variables into the templates, perhaps title, sitename etc, you can use the --tags key=pair i.e. --tags title="This is my site"; the variable would be accessible from {{ .title }}
Expand Down

0 comments on commit ea960a9

Please sign in to comment.