Spring Boot authentication starter for Tuurio ID using Spring Security OAuth2 Client and OpenID Connect.
Generated from
Tuurio/auth_samples/auth_samples_java. Submit implementation fixes upstream so they are not replaced by the next synchronized release.
- Standards-based OpenID Connect authentication with framework-native integration.
- Exact redirect and post-logout redirect handling.
- Protected-route and logout examples.
- A reviewed, pinned Tuurio provisioning workflow.
- Create a repository with Use this template or clone this repository.
- Follow the framework-specific prerequisites below.
- Review and run this pinned provisioning command:
npx manage-tuurio-id@1.1.6 init --framework spring --project-dir . --auth browser --yes --output json --campaign github_spring_boot --no-open --no-wait- Approve the exact command, then complete the secure browser handoff yourself.
- Run the build and verify one real sign-in and sign-out.
Never paste credentials, client secrets, authorization codes, tokens, session cookies, or environment-file contents into an agent chat. Browser and native applications are public clients and must not contain a client secret.
- Runtime: Java 17+
- Package manager: Gradle Wrapper
- Verification:
./gradlew --no-daemon test && ./gradlew --no-daemon bootJar
This starter uses OpenID Connect Authorization Code flow. Browser and native clients use PKCE S256 and contain no client secret. Redirect and post-logout redirect URIs must match exactly. Identity comes from the established OIDC integration or an authenticated UserInfo request; decoded JWT payloads are never treated as validation. Keep generated local environment files ignored and never commit tokens or credentials.
A server-rendered Spring Boot demo that signs in with OAuth 2.0 / OpenID Connect, then displays token contents and a logout button.
- Detailed integration guide: Spring Boot example page
- General developer docs: Tuurio ID developers
cd auth_samples_java
npx manage-tuurio-id@1.1.6 init --framework spring --project-dir . --auth browser --yes --output json --campaign github_spring_boot --no-open --no-wait
./gradlew bootRunOpen http://localhost:8085.
Configure your Tuurio client with these redirect URLs (matching your .env values):
Redirect URI: http://localhost:8085/auth/callback
Post-logout Redirect URI: http://localhost:8085/logout/callback
TUURIO_ISSUER=https://your-tenant.id.tuurio.com
TUURIO_CLIENT_ID=replace-with-your-server-client-id
TUURIO_CLIENT_SECRET=replace-with-your-client-secret
TUURIO_REDIRECT_URI=http://localhost:8085/auth/callback
TUURIO_POST_LOGOUT_REDIRECT_URI=http://localhost:8085/logout/callback
TUURIO_SCOPE=openid,profile,emailValues come from your Tuurio Connect page:
https://<tenantId>.id.tuurio.com/admin/clients
Licensed under the Apache License, Version 2.0. See LICENSE.
