Verify Token
GET
/api/v1/auth/verify
const url = 'https://api.spartanauth.com/api/v1/auth/verify';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.spartanauth.com/api/v1/auth/verifyValidates 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.
Responses
Section titled “ Responses ”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}default
Section titled “default ”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" } ]}