Spring Security Token API

The Token API from Spring Security — 3 operation(s) for token.

Business capability
Identity & Access Management BC-620.20

Operations 3

POST /oauth2/token OAuth2 Token Request #
POST /oauth2/introspect Token Introspection #
POST /oauth2/revoke Token Revocation #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/spring-security-token-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

spring-security-token-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Spring Security Token API
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: '1.0'
  description: 'Operations tagged Token across 2 of this provider''s published API definitions: spring-authorization-server-openapi.yml, spring-security-oauth2-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://localhost:9000
  description: Default authorization server port
- url: http://localhost:8080
  description: Default application server
tags:
- name: Token
paths:
  /oauth2/token:
    post:
      operationId: tokenRequest
      summary: OAuth2 Token Request
      description: Issues access tokens for all supported grant types
      tags:
      - Token
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - grant_type
              properties:
                grant_type:
                  type: string
                  enum:
                  - authorization_code
                  - refresh_token
                  - client_credentials
                  - urn:ietf:params:oauth:grant-type:device_code
                  - urn:ietf:params:oauth:grant-type:token-exchange
                code:
                  type: string
                redirect_uri:
                  type: string
                code_verifier:
                  type: string
                refresh_token:
                  type: string
                scope:
                  type: string
                client_id:
                  type: string
                client_secret:
                  type: string
      security:
      - basicAuth: []
      - {}
      responses:
        '200':
          description: Token response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          description: Token error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
    servers:
    - url: http://localhost:9000
      description: Default authorization server port
  /oauth2/introspect:
    post:
      operationId: tokenIntrospection
      summary: Token Introspection
      description: Validates tokens and returns active token metadata per RFC 7662
      tags:
      - Token
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - token
              properties:
                token:
                  type: string
                token_type_hint:
                  type: string
      security:
      - basicAuth: []
      responses:
        '200':
          description: Introspection response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntrospectionResponse'
    servers:
    - url: http://localhost:9000
      description: Default authorization server port
  /oauth2/revoke:
    post:
      operationId: tokenRevocation
      summary: Token Revocation
      description: Revokes access or refresh tokens per RFC 7009
      tags:
      - Token
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - token
              properties:
                token:
                  type: string
                token_type_hint:
                  type: string
      security:
      - basicAuth: []
      responses:
        '200':
          description: Token revoked
    servers:
    - url: http://localhost:9000
      description: Default authorization server port
components:
  schemas:
    TokenResponse:
      type: object
      properties:
        access_token:
          type: string
        token_type:
          type: string
        expires_in:
          type: integer
        refresh_token:
          type: string
        scope:
          type: string
        id_token:
          type: string
    IntrospectionResponse:
      type: object
      properties:
        active:
          type: boolean
        scope:
          type: string
        client_id:
          type: string
        username:
          type: string
        token_type:
          type: string
        exp:
          type: integer
        sub:
          type: string
    OAuthError:
      type: object
      properties:
        error:
          type: string
        error_description:
          type: string
    TokenResponse_2:
      type: object
      properties:
        access_token:
          type: string
        token_type:
          type: string
          enum:
          - Bearer
        expires_in:
          type: integer
          description: Token lifetime in seconds
        refresh_token:
          type: string
        scope:
          type: string
        id_token:
          type: string
          description: JWT ID token (OpenID Connect only)
    IntrospectionResponse_2:
      type: object
      required:
      - active
      properties:
        active:
          type: boolean
        scope:
          type: string
        client_id:
          type: string
        username:
          type: string
        token_type:
          type: string
        exp:
          type: integer
        iat:
          type: integer
        sub:
          type: string
        aud:
          type: string
        iss:
          type: string
        jti:
          type: string
    OAuthError_2:
      type: object
      properties:
        error:
          type: string
          enum:
          - invalid_request
          - invalid_client
          - invalid_grant
          - unauthorized_client
          - unsupported_grant_type
          - invalid_scope
        error_description:
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-refined-from:
- spring-authorization-server-openapi.yml
- spring-security-oauth2-openapi.yml