Skip to content

Commit

Permalink
Formating docs, moved example nginx config to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Forceu committed Jan 20, 2024
1 parent 6936ced commit 1ce1d3c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 46 deletions.
55 changes: 49 additions & 6 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,49 @@ Examples
===========================



*********************************
Nginx Configuration
*********************************


.. code-block:: nginx
server {
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /your/certificate/fullchain.pem;
ssl_certificate_key /your/certificate/privkey.pem;
client_max_body_size 500M;
client_body_buffer_size 128k;
server_name your.server.url;
location / {
# If using Cloudflare
proxy_set_header X-Forwarded-Host $http_cf_connecting_ip;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_pass http://127.0.0.1:53842;
}
# Always redirect to https
if ( $scheme = http ) {
return 301 https://$server_name$request_uri;
}
}
*********************************
OpenID Connect Configuration
*********************************
Expand Down Expand Up @@ -135,17 +178,15 @@ Creating the client

* Client Type: OpenID Connect
* Client ID: a unique ID, ``gokapi-dev`` is used in this example

#. Click ``Next``

* Set ``Client authentication`` to on
* Only select ``Standard flow`` in ``Authentication flow``
#. Click ``Next``

* Add your redirect URL, e.g. ``https://gokapi.website.com/oauth-callback``
* Click ``Save``
#. Click ``Credentials``

#. Click ``Next``, add your redirect URL, e.g. ``https://gokapi.website.com/oauth-callback`` and click ``Save``

* Note the ``Client Secret``
#. Click ``Credentials`` and note the ``Client Secret``


Addding a scope for exposing groups (optional)
Expand All @@ -163,7 +204,9 @@ Addding a scope for exposing groups (optional)
* Click ``Add predefined mapper``
* Search for ``groups`` and tick
* Click ``Add``

#. In the realm click on ``[Manage] Clients`` and then ``gokapi-dev``

* Click ``Client Scopes``
* Click ``Add Client Scope``
* Select ``groups`` and click ``Add / Optional``
Expand Down
40 changes: 0 additions & 40 deletions example/nginx.conf

This file was deleted.

0 comments on commit 1ce1d3c

Please sign in to comment.