# Identity Reference (/docs/identity/reference)



Voidnet runs a standard OpenID Connect provider. Publisher servers only need the discovery document and the public keys; the rest is used by Voidnet itself.

## Issuer [#issuer]

`https://oauth.openvoidnet.com`

## Endpoints [#endpoints]

| Endpoint                            | Method | Purpose                                    |
| ----------------------------------- | ------ | ------------------------------------------ |
| `/.well-known/openid-configuration` | GET    | Discovery                                  |
| `/.well-known/jwks.json`            | GET    | Public signing keys                        |
| `/oauth2/auth`                      | GET    | Authorization code flow with PKCE (`S256`) |
| `/oauth2/token`                     | POST   | Code exchange and refresh                  |
| `/userinfo`                         | GET    | Claims for an access token                 |
| `/oauth2/revoke`                    | POST   | Revoke an access or refresh token          |
| `/oauth2/sessions/logout`           | GET    | RP-initiated logout                        |

## Client types [#client-types]

| Type         | Authentication              | Use                                   |
| ------------ | --------------------------- | ------------------------------------- |
| Confidential | `client_secret_basic`       | Web app with a backend                |
| Public       | none, PKCE `S256` mandatory | Native app, CLI, backend-for-frontend |

Browser sign-in clients request `openid profile email`. Call-time clients request `openid profile email offline_access` and are audience-bound to a publisher resource.

## Scopes [#scopes]

`openid`, `profile`, `email`, `offline_access`.

No custom scopes are issued. An app's audience URI is not a scope.

## Identity token claims [#identity-token-claims]

| Claim                | Description                      |
| -------------------- | -------------------------------- |
| `iss`                | `https://oauth.openvoidnet.com`  |
| `sub`                | Stable Voidnet user id           |
| `aud`                | The publisher's audience URI     |
| `exp`                | Expiry, 15 minutes after issue   |
| `iat`                | Issue time                       |
| `scope`              | Granted scopes, space separated  |
| `email`              | Present with the `email` scope   |
| `email_verified`     | Present with the `email` scope   |
| `name`               | Present with the `profile` scope |
| `preferred_username` | Present with the `profile` scope |

## Errors [#errors]

| Code                     | Status | Meaning                                                                 |
| ------------------------ | ------ | ----------------------------------------------------------------------- |
| `identity_link_required` | 403    | The app requires identity and the buyer has not connected the publisher |
| `identity_unavailable`   | 503    | The identity provider could not issue a token                           |

Both errors are returned by the gateway in the standard Voidnet error envelope.
