---
agent_auth:
  version: "1.0"
  default_mode: "user_mediated"
  register_uri: "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_EqTD6LeWp/oauth2/register"
  identity_types_supported:
    - oauth2_client
    - anonymous
  credential_types_supported:
    - client_secret_basic
    - client_secret_post
    - bearer
---

# Toyota app auth.md

This document describes how to register and authenticate AI agents with Toyota app.

## Overview

This application uses **AWS Cognito** for authentication with OAuth 2.0 / OpenID Connect.

## Agent Registration

1. Obtain client credentials from the application administrator
2. Register at the OAuth authorization server: `https://www.toyota.com.co/.well-known/oauth-authorization-server`
3. Review the protected resource metadata: `https://www.toyota.com.co/.well-known/oauth-protected-resource`

## Authentication Flows

### Agent Verified (Machine-to-Machine)

1. Obtain client credentials from the application administrator
2. Exchange credentials for an access token using the OAuth token endpoint
3. Include the token in the `Authorization: Bearer <token>` header

### User Claimed (Delegated Access)

1. Redirect the user to the authorization endpoint
2. User authenticates and grants consent
3. Exchange the authorization code for tokens
4. Use the access token for API requests

## Endpoints

- **Issuer**: `https://cognito-idp.us-east-1.amazonaws.com/us-east-1_EqTD6LeWp`
- **Authorization**: `https://cognito-idp.us-east-1.amazonaws.com/us-east-1_EqTD6LeWp/oauth2/authorize`
- **Token**: `https://cognito-idp.us-east-1.amazonaws.com/us-east-1_EqTD6LeWp/oauth2/token`
- **UserInfo**: `https://cognito-idp.us-east-1.amazonaws.com/us-east-1_EqTD6LeWp/oauth2/userInfo`
- **JWKS**: `https://cognito-idp.us-east-1.amazonaws.com/us-east-1_EqTD6LeWp/.well-known/jwks.json`

## Scopes

- `openid` — OpenID Connect identity
- `profile` — User profile information
- `email` — User email address

## Resources

- [API Specification](https://www.toyota.com.co/openapi.json)
- [OAuth Discovery](https://www.toyota.com.co/.well-known/oauth-authorization-server)
- [MCP Server](https://www.toyota.com.co/mcp)