Docker Hub · Capability

Docker HUB API — authentication-api

Docker HUB API — authentication-api. 3 operations. Lead operation: Create access token. Self-contained Naftiko capability covering one Docker Hub business surface.

Run with Naftiko Docker Hubauthentication-api

What You Can Do

POST
Authcreateaccesstoken — Create access token
/v1/v2/auth/token
POST
Postusers2falogin — Second factor authentication
/v1/v2/users/2fa-login
POST
Postuserslogin — Create an authentication token
/v1/v2/users/login

MCP Tools

create-access-token

Create access token

second-factor-authentication

Second factor authentication

create-authentication-token

Create an authentication token

Capability Spec

docker-hub-authentication-api.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Docker HUB API — authentication-api
  description: 'Docker HUB API — authentication-api. 3 operations. Lead operation: Create access token. Self-contained Naftiko
    capability covering one Docker Hub business surface.'
  tags:
  - Docker Hub
  - authentication-api
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DOCKER_HUB_API_KEY: DOCKER_HUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: docker-hub-authentication-api
    baseUri: https://hub.docker.com
    description: Docker HUB API — authentication-api business capability. Self-contained, no shared references.
    resources:
    - name: v2-auth-token
      path: /v2/auth/token
      operations:
      - name: authcreateaccesstoken
        method: POST
        description: Create access token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v2-users-2fa-login
      path: /v2/users/2fa-login
      operations:
      - name: postusers2falogin
        method: POST
        description: Second factor authentication
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v2-users-login
      path: /v2/users/login
      operations:
      - name: postuserslogin
        method: POST
        description: Create an authentication token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.DOCKER_HUB_API_KEY}}'
  exposes:
  - type: rest
    namespace: docker-hub-authentication-api-rest
    port: 8080
    description: REST adapter for Docker HUB API — authentication-api. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v2/auth/token
      name: v2-auth-token
      description: REST surface for v2-auth-token.
      operations:
      - method: POST
        name: authcreateaccesstoken
        description: Create access token
        call: docker-hub-authentication-api.authcreateaccesstoken
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/users/2fa-login
      name: v2-users-2fa-login
      description: REST surface for v2-users-2fa-login.
      operations:
      - method: POST
        name: postusers2falogin
        description: Second factor authentication
        call: docker-hub-authentication-api.postusers2falogin
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/users/login
      name: v2-users-login
      description: REST surface for v2-users-login.
      operations:
      - method: POST
        name: postuserslogin
        description: Create an authentication token
        call: docker-hub-authentication-api.postuserslogin
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: docker-hub-authentication-api-mcp
    port: 9090
    transport: http
    description: MCP adapter for Docker HUB API — authentication-api. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-access-token
      description: Create access token
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: docker-hub-authentication-api.authcreateaccesstoken
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: second-factor-authentication
      description: Second factor authentication
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: docker-hub-authentication-api.postusers2falogin
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-authentication-token
      description: Create an authentication token
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: docker-hub-authentication-api.postuserslogin
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.