Skip to content

Commit

Permalink
feat: Allow to provide access to the site using referrer (close #11)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Jul 4, 2024
1 parent ab7aa66 commit 76b51c9
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions docs/guide/usage.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# Usage

## Using referrer restriction

To restrict the access to the site from a set of subdomains referrers, you need to declare the following properties in the `ThemeConfig` object:

1. `referrer` with such a content:

```js
referrer: {
subdomains: 'kalisio.com,doc.kalisio.xyz' // Subdomains to auhtorize the access
}
```

2. `useReferrer` to `true`

## Using Keycloak authentication

To enforce user authentication with **Keycloak**, all you need to do is:
To enforce user authentication with **Keycloak**, all you need to do is to declare the followinf properties in the `ThemeConfig` object:

1. Declare a `keycloak` section in the `ThemeConfig` object like this:
1. `keycloak` with such a content:

```js
keycloak: {
Expand All @@ -16,7 +30,7 @@ keycloak: {
}
```

2. Declare a `useKeycloak` property to `true` in the `ThemeConfig` object:
2. `useKeycloak` to `true`

```js
useKeycloak: true
Expand All @@ -26,6 +40,10 @@ useKeycloak: true
During development, it may be convenient to bypass **Keycloak** authentication. You can achieve this by either commenting out the relevant line or utilizing an environment variable. This allows you to set or unset the variable, avoiding the need to modify the `config.js` file.
:::

::: tip
You can combine **referrer restriction** and **Keycloak authentication**. In that case, **Keycloak authentication** will be executed if and only if **referrer restriction** fails.
:::

## Using Quasar framework

**Quasar framework** is shipped with the theme. You can simply create any components and use any features provided by Quasar.
Expand Down

0 comments on commit 76b51c9

Please sign in to comment.