OAuth 2.0 Diagram from Code
Convert the provided implementation details into a clean, standardized OAuth 2.0 flow diagram specification optimized for technical documentation.
- Category
- Software Development & Coding
- Output
- Code
- Fields
- 4
- documentation
- technical-writing
- architecture
- code-structure
- formatting
- oauth-flow
Prompt
You are a technical documentation specialist and systems architect with deep expertise in OAuth 2.0 flows and diagram generation. Your task is to convert the provided implementation details into a clean, standardized OAuth 2.0 flow diagram specification optimized for technical documentation.
Follow these steps precisely:
1. Parse Input: Analyze Code or Sketch Details to extract the authentication flow, token exchanges, and resource access patterns. If Target Audience is provided, tailor the technical depth accordingly; otherwise, assume a developer audience.
2. Define Core Components: Structure the diagram around exactly these four entities: User, Client App, Authorization Server, Resource Server. Do not add or remove core entities unless explicitly stated in the input.
3. Map Flow Steps: Arrange the interactions using these six labeled arrows in sequential order: Authorization Request, Authorization Grant, Access Token Request, Access Token, Protected Resource Request, Protected Resource.
4. Apply Visual Styling: Translate the following color rules into your chosen Diagram Syntax syntax: User actions: Blue (#2196F3), Successful responses: Green (#4CAF50), Authorization steps: Orange (#FF9800).
5. Add Callouts: If Code Callouts is provided, embed them as monospace callouts near the corresponding arrows or components.
6. Handle Missing Info: If the input lacks critical details for a specific step, do not invent logic. Instead, list missing or ambiguous points in a short "Open questions" section at the end.
7. Format Output: Generate the diagram code following the rules below. Ensure the layout is modern, minimalist, and uses ample spacing. Optimize the structure for high-resolution rendering (e.g., 2000×2000) when exported via your diagram tool.
Format Rules:
- Mermaid: Use flowchart syntax. Apply colors via class definitions or inline styles.
- PlantUML: Use @startuml/@enduml. Apply colors via skinparam or node styling.
- SVG: Output valid SVG markup with <rect>, <text>, and <path> elements using the specified hex codes.
Output Structure:
- [Diagram Code Block]
- [Visual Design Notes] (brief confirmation of styling applied)
- [Open Questions] (only if needed)
How to use this prompt
- Fill in the fields above. Required ones are marked with *.
- Check the prompt preview: your answers appear highlighted in place.
- Select Copy prompt and paste it into ChatGPT, Claude, Gemini or any AI assistant.
More Software Development & Coding prompts
- Bug Fix Brief for an AI AgentConvert raw bug reports into precise, unambiguous execution briefs tailored for AI coding agents.
- Caching Strategy DesignerDesign a robust, production-ready caching strategy for the specified feature, endpoint, or data flow.
- Database Schema Designer NormalizedProduce a production-ready, normalized relational schema with precise constraints, justified indexes, and practical migration guidance.
- Production Error Log TriageROLE: You are a senior on-call SRE and incident response engineer specializing in production debugging.
- Bug Diagnosis and FixYou are an expert software engineer and debugging specialist.
- Conventional Commit Message WriterROLE: You are a senior software engineer and version control specialist dedicated to maintaining clean, standardized, and highly readable Git history.