# killmails/oauth2-eve architecture

> Architecture diagram of the GitHub repository killmails/oauth2-eve, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/killmails/oauth2-eve
- Repository: https://github.com/killmails/oauth2-eve

## Overview

A small PHP League OAuth 2.0 provider for EVE Online. The host application uses the League client and this provider for authorization-code login; the provider supplies EVE endpoints and converts the returned identity token into an EVE resource owner. Source is limited to the provider classes, so League internals and HTTP transport are represented only at the documented integration boundary.

Main entry points: [`src/Provider/EveOnline.php`](https://github.com/killmails/oauth2-eve/blob/main/src/Provider/EveOnline.php) (EVE provider), [`src/Provider/EveOnlineResourceOwner.php`](https://github.com/killmails/oauth2-eve/blob/main/src/Provider/EveOnlineResourceOwner.php) (EVE resource owner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_oauth["OAuth integration"]
  node_league["League OAuth client"]
  node_provider["EVE provider<br/>[EveOnline.php]"]
  node_eve_sso["EVE SSO"]
end

subgraph group_identity["Identity mapping"]
  node_jwks["EVE JWKS"]
  node_jwt["JWT/JWK library"]
  node_owner["EVE resource owner"]
end

node_application(("Host application"))

node_application -->|"uses"| node_league
node_league -->|"invokes provider"| node_provider
node_provider -->|"supplies endpoints"| node_league
node_league -->|"authorization and token requests"| node_eve_sso
node_league -->|"fetches keys"| node_jwks
node_league -->|"passes token and keys"| node_provider
node_provider -->|"decodes token"| node_jwt
node_provider -->|"creates identity"| node_owner
node_application -->|"reads identity"| node_owner

click node_provider "https://github.com/killmails/oauth2-eve/blob/main/src/Provider/EveOnline.php"
click node_owner "https://github.com/killmails/oauth2-eve/blob/main/src/Provider/EveOnlineResourceOwner.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_league,node_provider,node_eve_sso toneBlue
class node_jwks,node_jwt,node_owner toneAmber
class node_application toneIndigo
```

## Components

### OAuth integration

- **League OAuth client**
- [EVE provider](https://github.com/killmails/oauth2-eve/blob/main/src/Provider/EveOnline.php): `src/Provider/EveOnline.php`
- **EVE SSO**

### Identity mapping

- **EVE JWKS**
- **JWT/JWK library**
- [EVE resource owner](https://github.com/killmails/oauth2-eve/blob/main/src/Provider/EveOnlineResourceOwner.php): `src/Provider/EveOnlineResourceOwner.php`

### Other components

- **Host application**

## Connections

- Host application → League OAuth client: uses
- League OAuth client → EVE provider: invokes provider
- EVE provider → League OAuth client: supplies endpoints
- League OAuth client → EVE SSO: authorization and token requests
- League OAuth client → EVE JWKS: fetches keys
- League OAuth client → EVE provider: passes token and keys
- EVE provider → JWT/JWK library: decodes token
- EVE provider → EVE resource owner: creates identity
- Host application → EVE resource owner: reads identity
