Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor mistakes in auth docs #1270

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions docs/docs/setup/auth/user/callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,13 @@ The callback can read those headers, and build the user information Tobira expec
It can of course also request additional information from external services, e.g. a list of courses the user is signed up for.

```toml
[general]
reserved_paths = ["Shibboleth.sso"]

[auth]
source = "callback:http://localhost:9090/"
login_link = "/Shibboleth.sso/Login"
logout_link = "/Shibboleth.sso/Logout"

[auth.callback]
relevant_headers = [
Expand All @@ -184,10 +189,10 @@ Here is an example for the callback daemon.

```ts
Deno.serve({ port: 9090 }, request => {
const uniqueID = request.header.get("Variable-uniqueID");
const fullName = request.header.get("Variable-fullName");
const email = request.header.get("Variable-mail");
const affiliation = request.header.get("Variable-affiliation");
const uniqueID = request.headers.get("Variable-uniqueID");
const fullName = request.headers.get("Variable-fullName");
const email = request.headers.get("Variable-mail");
const affiliation = request.headers.get("Variable-affiliation");

// If the headers are not set, the request is not authenticated
if (!uniqueID || !fullName || !email) {
Expand Down
Loading