# SESAME > SESAME is Wayne State's sign-in library for PHP. It checks who someone is through CAS, OpenID Connect, SAML, an OAuth2 token or the Drawbridge gateway, and hands your app a verified identity. Your app keeps its own session. It works in raw PHP, Laravel with Blade, and Laravel with Inertia and Vue. **The way in. One lock, any key.** Single Entry, Sessions App-Managed Everywhere: keys cut while you wait, and no key ever gets to keep the door. Checks: `composer ci` (the same command CI runs on git.wayne.edu): seven checks (manifest, tests, Pint, PHPStan, the agent-ready pages, the docs build, audit). SESAME is Wayne State's protocol-neutral auth library. It returns a verified identity and leaves the session to the app: every driver ends in the same place, the app's `findOrImportUser(Identity)`, and the protocol never holds the session. Switching driver is a config change with no code change. Open sesame. Front page: [`site/index.html`](https://github.com/waynestate/sesame/blob/HEAD/site/index.html), a static page you can open in a browser or serve from `site/`. On Citadel it is served by the raw-PHP deploy layer in [`deploy/`](https://github.com/waynestate/sesame/blob/HEAD/deploy/): a Squire kit whose front controller serves `site/` behind HELMET's security headers. For local development, keep serving `site/` directly. Documentation: the opening of this README is the [Overview](https://github.com/waynestate/sesame/blob/HEAD/site/docs/index.html) page of the docs site. Squire's docs builder renders [`docs/`](https://github.com/waynestate/sesame/blob/HEAD/docs/) into [`site/docs/`](https://github.com/waynestate/sesame/blob/HEAD/site/docs/index.html); `composer docs` rebuilds it, and `composer docs:check` fails when the build or the generated environment reference has drifted. The docs pages wear the front page's key shop: to change their look, edit [`docs/_header.html`](https://github.com/waynestate/sesame/blob/HEAD/docs/_header.html) (the shop sign and main menu) and [`docs/theme/sesame.css`](https://github.com/waynestate/sesame/blob/HEAD/docs/theme/sesame.css) (palette, type, dark mode), then rebuild. Never edit the kit's `site/assets/docs.css` or `docs.js`; those are Squire's bytes. Every page below is Markdown. The HTML pages send the same Markdown to a client that asks for `text/markdown`. Written by Squire's agent-ready kit from the README and the pages; do not edit. ## Pages - [SESAME: The way in.](https://sesame.apps.wayne.edu/index.md): SESAME is Wayne State's sign-in library for PHP. It checks who someone is through CAS, OpenID Connect, SAML, an OAuth2 token or the Drawbridge gateway, and hands your app a verified identity. Your app keeps its own session. It works in raw PHP, Laravel with Blade, and Laravel with Inertia and Vue. - [Changelog | SESAME docs](https://sesame.apps.wayne.edu/docs/changelog.md): All notable changes to this project. - [The cas driver | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/driver-cas.md): Sign in against a CAS server, CAS 2.0 against Academica by default, with no per-app Entra registration. - [The gateway driver | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/driver-gateway.md): The recommended path on Citadel: verify the signed JWT assertion the Drawbridge gateway sends in one header, never a bare identity header. - [oauth2 with Entra | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/driver-oauth2-entra.md): Sign in from a JWT bearer token verified against the issuer's key set, or from an opaque token through RFC 7662 introspection, Microsoft Entra ID first, APIs only. - [The oidc driver (Entra sign-in) | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/driver-oidc.md): Browser sign-in with OpenID Connect (code flow with PKCE), Microsoft Entra ID first, for apps off Citadel and APIs. - [The saml driver (SAML 2.0 sign-in) | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/driver-saml.md): Browser sign-in as a SAML 2.0 service provider against a Shibboleth-style IdP, opt-in, with signed assertions required. - [Strongly recommended: a git.wayne.edu instance runner | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/instance-runner.md): CI for this repo runs on git.wayne.edu, on the instance runner, and every product in the stack strongly recommends the same for apps on git.wayne.edu. - [Laravel | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/laravel.md): The Laravel adapter binds the core into the container, registers the middleware aliases and the login and logout routes, and holds no rules of its own. - [Counting sign-ins (metrics) | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/metrics.md): SESAME can count every finished sign-in as sesame_logins_total, by driver and outcome, in HELMET's metrics store, so it shows on HELMET's /metrics. Off by default. - [Moving from wayne-cas | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/moving-from-wayne-cas.md): Apps that use wayne-cas can move to SESAME without rewriting their auth, through Booster's cas-to-sesame hop or by hand. - [Moving off Wayne Auth | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/moving-off-wayne-auth.md): Apps that sign people in through the old Wayne Auth SSO cookie can move to SESAME's CAS sign-in by changing one line, through a bridge that keeps the old WayneAuth class's calls. - [Quick start | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/quick-start.md): Sign a user in from scratch with the fake driver, one step at a time. - [Raw PHP | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/raw-php.md): How a framework-free PHP app starts the session, builds the Sesame facade, signs the user in, and reads the user back. - [Requiring MFA | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/requiring-mfa.md): Require proof that the user's MFA is still good, and pick what happens when the check fails: deny with 403, or send the user back to login. - [Running off Citadel | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/running-off-citadel.md): SESAME takes its config from the app and has no platform address in code, so a move to another host is a config change, not a code change. - [Session timeouts | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/session-timeouts.md): Every signed-in session has two clocks: an idle timeout that drops it after quiet time and an absolute lifetime that ends it no matter how active it is. - [Single-page apps | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/single-page-apps.md): A single-page app reads a JSON answer to see who is signed in: sesame_status() in raw PHP and GET /sesame/status in Laravel, 200 with the session facts or 401 when signed out, never cacheable. - [Step-up (authentication context) | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/step-up.md): Send the user back through a stronger sign-in mid-session, with the prompt, max_age, acr_values and claims parameters a step-up request adds. - [Which driver for my app? | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/which-driver.md): A table that matches your situation to a driver and tells you the Entra registration it needs. - [WSU values (Playbook) | SESAME docs](https://sesame.apps.wayne.edu/docs/guides/wsu-values.md): Four settings carry Wayne State's shared values: where the CAS server lives, and who signs the gateway and oauth2 assertions. - [Overview | SESAME docs](https://sesame.apps.wayne.edu/docs/index.md): Wayne State's protocol-neutral auth library: it returns a verified identity and leaves the session to the app. - [Install | SESAME docs](https://sesame.apps.wayne.edu/docs/install.md): What SESAME needs, the one composer line, and how to prove it took. - [The oidc driver's library choice | SESAME docs](https://sesame.apps.wayne.edu/docs/oidc-library-choice.md): Which library the oidc driver stands on, what else was weighed, and why. - [API | SESAME docs](https://sesame.apps.wayne.edu/docs/reference/api.md): The classes and global functions an app uses: Config, DriverFactory, Sesame, the session, the resolver, and the sesame_* functions. - [Configuration | SESAME docs](https://sesame.apps.wayne.edu/docs/reference/configuration.md): Every SESAME config key, its environment variable, its default and its meaning. - [Drivers | SESAME docs](https://sesame.apps.wayne.edu/docs/reference/drivers.md): The full list of drivers and their status: fake, cas, gateway, saml, oauth2 and oidc. - [Proof | SESAME docs](https://sesame.apps.wayne.edu/docs/reference/proof.md): Proof runs against real Wayne State applications on a private site, behind a Wayne State employee sign-in. - [Decision: the 60 second regenerate grace | SESAME docs](https://sesame.apps.wayne.edu/docs/reference/regenerate-grace.md): Why SESAME keeps the old session for 60 seconds after it regenerates the session ID, and how to turn that off. - [The saml driver's library choice | SESAME docs](https://sesame.apps.wayne.edu/docs/saml-library-choice.md): Which library the saml driver stands on, what else was weighed, why, and the version floor. - [Troubleshooting | SESAME docs](https://sesame.apps.wayne.edu/docs/troubleshooting.md): What to try when a sign-in fails, and what the errors mean. - [Upgrading | SESAME docs](https://sesame.apps.wayne.edu/docs/upgrading.md): How to move between SESAME versions. ## Prompts - [Get started with SESAME](https://sesame.apps.wayne.edu/#prompt-get-started): Works out what kind of app you have and which driver it needs, then writes a plan. It changes nothing. The prompt itself is in https://sesame.apps.wayne.edu/index.md. - [SESAME in a raw PHP app](https://sesame.apps.wayne.edu/#prompt-raw-php): Sets up the config, the driver and a user resolver by hand, on your app's own session, with a logout that only accepts a POST. The prompt itself is in https://sesame.apps.wayne.edu/index.md. - [SESAME in a Laravel app with Blade](https://sesame.apps.wayne.edu/#prompt-laravel-blade): Publishes the config, writes a user resolver, puts auth.sesame on your routes and adds a sign-out form with a CSRF token. The prompt itself is in https://sesame.apps.wayne.edu/index.md. - [SESAME in a Laravel app with Inertia and Vue](https://sesame.apps.wayne.edu/#prompt-laravel-inertia): Uses the same adapter. Routes are guarded on the server, and Vue gets only the user fields it needs as a prop. The prompt itself is in https://sesame.apps.wayne.edu/index.md. - [Move a Laravel app from wayne-cas to SESAME](https://sesame.apps.wayne.edu/#prompt-wayne-cas): No shim since 0.8.0: the old names go, SESAME's own come in, and the mapping table says which is which. The agent lists every wayne-cas part before it swaps one. The prompt itself is in https://sesame.apps.wayne.edu/index.md. ## Source - [README](https://github.com/waynestate/sesame/blob/HEAD/README.md): the project's README, with install, commands and checks - [Everything in one file](https://sesame.apps.wayne.edu/llms-full.txt): the README and every page above, as one Markdown file ## Optional - [ADVISOR](https://advisor.apps.wayne.edu/llms.txt): the stack's MCP server: read-only tools that answer from CREED's policy and the parts' docs instead of from memory - [WELD](https://weld.apps.wayne.edu/llms.txt): the Wayne State application stack: every part, and the reference app