Skip to content

Verify Token

GET
/api/v1/auth/verify
curl --request GET \
--url https://api.spartanauth.com/api/v1/auth/verify

Validates the bearer token from the Authorization header for Traefik ForwardAuth-style integrations. Public endpoint; on success it also returns the resolved identity fields that upstream services can trust.

A successful response.

Media type application/json
object
valid
boolean
sub
string
username
string
sectorID
string
isAdmin
boolean
Example generated
{
"valid": true,
"sub": "example",
"username": "example",
"sectorID": "example",
"isAdmin": true
}

An unexpected error response.

Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}