> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Read OAuth protected-resource metadata

> Say where to log in, for `mirage login`.

RFC 9728's protected resource metadata names the issuer, and
`client_id` the OAuth client the CLI signs in as. A server that
publishes no login answers 404, so the CLI knows it needs none.



## OpenAPI

````yaml /openapi.yaml get /.well-known/oauth-protected-resource
openapi: 3.1.0
info:
  title: Mirage API
  version: '0.1'
servers:
  - url: http://127.0.0.1:8765
    description: A local daemon on its default port
security:
  - bearerAuth: []
paths:
  /.well-known/oauth-protected-resource:
    get:
      tags:
        - Auth
      summary: Read OAuth protected-resource metadata
      description: |-
        Say where to log in, for `mirage login`.

        RFC 9728's protected resource metadata names the issuer, and
        `client_id` the OAuth client the CLI signs in as. A server that
        publishes no login answers 404, so the CLI knows it needs none.
      operationId: protected_resource__well_known_oauth_protected_resource_get
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProtectedResource'
      security: []
components:
  schemas:
    ProtectedResource:
      properties:
        resource:
          type: string
          title: Resource
        authorization_servers:
          items:
            type: string
          type: array
          title: Authorization Servers
        bearer_methods_supported:
          items:
            type: string
          type: array
          title: Bearer Methods Supported
        client_id:
          type: string
          title: Client Id
      type: object
      required:
        - resource
        - authorization_servers
        - bearer_methods_supported
        - client_id
      title: ProtectedResource
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        The server's token (MIRAGE_AUTH_TOKEN) or a JWT. A daemon in the default
        local mode with no token accepts requests without one.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.