Authorization API#

Served by: GeoNeMo Toolkit API. Schemas are on the schemas page.

Method

Path

Summary

GET

/v1/auth/callback

Complete sign-in

GET

/v1/auth/consent

Show consent page

POST

/v1/auth/consent

Submit consent decision

GET

/v1/auth/login

Start sign-in

POST

/v1/auth/logout

Sign out

POST

/v1/auth/mcp-delegate

Issue MCP delegation token

GET

/v1/auth/me

Get current principal

GET

/v1/auth/tokens

List personal tokens

POST

/v1/auth/tokens

Create personal token

DELETE

/v1/auth/tokens/{token_id}

Revoke personal token

GET /v1/auth/callback#

Complete sign-in

Finishes the OIDC sign-in with the provider’s state and code, sets the session cookie and redirects to the console. Fails with 400 when sign-in cannot be completed. Needs no credentials.

  • Operation: callback_v1_auth_callback_get

  • Access: none

curl -X GET "https://geonemo.example.com/v1/auth/callback"

Parameters

Name

In

Type

Required

Description

state

query

string

yes

code

query

string

yes

X-GeoNemo-Project-ID

header

string

Organizational project metadata only; not an authorization or tenant boundary.

Responses

Status

Meaning

Body

200

OK

422

Validation Error

HTTPValidationError

POST /v1/auth/consent#

Submit consent decision

Records the decision from the consent form. On allow it redirects to finish the OAuth authorization; any other decision discards the request. Requires a browser session and a valid CSRF value (403 otherwise).

  • Operation: approve_v1_auth_consent_post

  • Access: none

curl -X POST "https://geonemo.example.com/v1/auth/consent"

Parameters

Name

In

Type

Required

Description

X-GeoNemo-Project-ID

header

string

Organizational project metadata only; not an authorization or tenant boundary.

Responses

Status

Meaning

Body

200

OK

422

Validation Error

HTTPValidationError

GET /v1/auth/login#

Start sign-in

Redirects the browser to the configured OIDC provider and sets a short-lived login-flow cookie. return_to must be / or a consent path, otherwise the request fails with 400. Needs no credentials.

  • Operation: login_v1_auth_login_get

  • Access: none

curl -X GET "https://geonemo.example.com/v1/auth/login"

Parameters

Name

In

Type

Required

Description

return_to

query

string

X-GeoNemo-Project-ID

header

string

Organizational project metadata only; not an authorization or tenant boundary.

Responses

Status

Meaning

Body

200

OK

422

Validation Error

HTTPValidationError

POST /v1/auth/logout#

Sign out

Deletes the browser session, clears its cookie and redirects to the console login page.

  • Operation: logout_v1_auth_logout_post

  • Access: bearer token or console session cookie

curl -X POST "https://geonemo.example.com/v1/auth/logout" \
  -H "Authorization: Bearer $TOKEN"

Parameters

Name

In

Type

Required

Description

X-GeoNemo-Project-ID

header

string

Organizational project metadata only; not an authorization or tenant boundary.

Responses

Status

Meaning

Body

200

OK

422

Validation Error

HTTPValidationError

POST /v1/auth/mcp-delegate#

Issue MCP delegation token

Exchanges the caller’s credential for a five-minute API token limited to the services:read, tools:execute and gkb:publish scopes the caller holds. For the MCP server only; it must present the configured delegation key header (403 otherwise).

  • Operation: delegate_v1_auth_mcp_delegate_post

  • Access: bearer token or console session cookie

curl -X POST "https://geonemo.example.com/v1/auth/mcp-delegate" \
  -H "Authorization: Bearer $TOKEN"

Parameters

Name

In

Type

Required

Description

X-GeoNemo-Project-ID

header

string

Organizational project metadata only; not an authorization or tenant boundary.

Responses

Status

Meaning

Body

200

OK

422

Validation Error

HTTPValidationError

GET /v1/auth/me#

Get current principal

Returns the signed-in principal’s ID, display name and granted scopes, plus an opaque cache_scope that differs for each credential.

  • Operation: me_v1_auth_me_get

  • Access: bearer token or console session cookie

curl -X GET "https://geonemo.example.com/v1/auth/me" \
  -H "Authorization: Bearer $TOKEN"

Parameters

Name

In

Type

Required

Description

X-GeoNemo-Project-ID

header

string

Organizational project metadata only; not an authorization or tenant boundary.

Responses

Status

Meaning

Body

200

OK

422

Validation Error

HTTPValidationError

GET /v1/auth/tokens#

List personal tokens

Lists the caller’s personal tokens with ID, name, scopes, audience and expiry. Token values are never returned. An expired token is listed for 30 days after its expiry.

  • Operation: list_tokens_v1_auth_tokens_get

  • Access: bearer token or console session cookie

curl -X GET "https://geonemo.example.com/v1/auth/tokens" \
  -H "Authorization: Bearer $TOKEN"

Parameters

Name

In

Type

Required

Description

X-GeoNemo-Project-ID

header

string

Organizational project metadata only; not an authorization or tenant boundary.

Responses

Status

Meaning

Body

200

OK

422

Validation Error

HTTPValidationError

POST /v1/auth/tokens#

Create personal token

Issues a personal access token for the api or mcp audience, limited to scopes the caller already holds and valid for 1 to 90 days (default 90). The token value appears only in this response. Requires a browser session; bearer credentials get 403.

  • Operation: create_token_v1_auth_tokens_post

  • Access: bearer token or console session cookie

curl -X POST "https://geonemo.example.com/v1/auth/tokens" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Parameters

Name

In

Type

Required

Description

X-GeoNemo-Project-ID

header

string

Organizational project metadata only; not an authorization or tenant boundary.

Request body

Content type

Schema

Required

application/json

PersonalTokenRequest

yes

Responses

Status

Meaning

Body

201

Created

422

Validation Error

HTTPValidationError

DELETE /v1/auth/tokens/{token_id}#

Revoke personal token

Revokes one of the caller’s personal tokens. Returns 404 when the token does not exist or belongs to someone else.

  • Operation: revoke_token_v1_auth_tokens__token_id__delete

  • Access: bearer token or console session cookie

curl -X DELETE "https://geonemo.example.com/v1/auth/tokens/<token_id>" \
  -H "Authorization: Bearer $TOKEN"

Parameters

Name

In

Type

Required

Description

token_id

path

string

yes

The personal token ID.

X-GeoNemo-Project-ID

header

string

Organizational project metadata only; not an authorization or tenant boundary.

Responses

Status

Meaning

Body

204

No Content

422

Validation Error

HTTPValidationError