initialization
This commit is contained in:
commit
9ff09693ed
92 files changed
+46209
No files matched your search
+268
@@ -0,0 +1,268 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Password Generator API - Complete Documentation</title>
|
||||
<link rel="stylesheet" href="../assets/css/style.css" />
|
||||
<link rel="stylesheet" href="../assets/css/style-docs.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="language-selector">
|
||||
<select id="language-select" class="language-select form-control form-control--language" onchange="switchLanguage(this.value)">
|
||||
<option value="en">🇺🇸 English</option>
|
||||
<option value="de">🇩🇪 Deutsch</option>
|
||||
<option value="de_CH">🇨🇭 Schwyzerdütsch</option>
|
||||
<option value="fr">🇫🇷 Français</option>
|
||||
<option value="es">🇪🇸 Español</option>
|
||||
<option value="pt">🇵🇹 Portugues</option>
|
||||
<option value="it">🇮🇹 Italiano</option>
|
||||
<option value="ja">🇯🇵 日本語</option>
|
||||
<option value="zh">🇨🇳 中文</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<header class="header">
|
||||
<div class="container">
|
||||
<h1>🔐 Password Generator API - Complete Guide</h1>
|
||||
<nav class="nav-links">
|
||||
<a href="/">← Back to Generator</a>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="main-container">
|
||||
<!-- Base URL and Quick Start -->
|
||||
<div class="intro-section">
|
||||
<h2>API Overview</h2>
|
||||
<div class="base-url">
|
||||
Base URL: <code>http://localhost:8080/api/v1</code>
|
||||
</div>
|
||||
|
||||
<div class="security-note">
|
||||
All password generation uses cryptographically secure random number generation for maximum security.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- High Entropy Generator -->
|
||||
<div class="generator-section">
|
||||
<div class="generator-header">
|
||||
<h3>🔐 High Entropy Generator</h3>
|
||||
<p>Cryptographically secure random passwords with full character set control.</p>
|
||||
</div>
|
||||
<div class="generator-content">
|
||||
<h4>Purpose & Use Case</h4>
|
||||
<p>Generate traditional random passwords with complete control over character types. Best for systems requiring specific character set compliance or when you need maximum randomness.</p>
|
||||
|
||||
<h4>Available Options</h4>
|
||||
|
||||
<div class="option-detail">
|
||||
<h4><span class="option-type">number</span><span class="option-default">16</span>length</h4>
|
||||
<p><strong>Range:</strong> 8-128 characters</p>
|
||||
<p><strong>Description:</strong> Total password length. Longer passwords provide exponentially more security.</p>
|
||||
<p><strong>Security Impact:</strong> Each additional character roughly doubles the time required to crack the password.</p>
|
||||
</div>
|
||||
|
||||
<div class="option-detail">
|
||||
<h4><span class="option-type">boolean</span><span class="option-default">true</span>include_uppercase</h4>
|
||||
<p><strong>Description:</strong> Include uppercase letters (A-Z) in the character set.</p>
|
||||
<p><strong>Character Set:</strong> ABCDEFGHIJKLMNOPQRSTUVWXYZ (26 characters)</p>
|
||||
<p><strong>Security Impact:</strong> Adds 26 possible characters, significantly increasing entropy.</p>
|
||||
</div>
|
||||
|
||||
<div class="option-detail">
|
||||
<h4><span class="option-type">boolean</span><span class="option-default">true</span>include_lowercase</h4>
|
||||
<p><strong>Description:</strong> Include lowercase letters (a-z) in the character set.</p>
|
||||
<p><strong>Character Set:</strong> abcdefghijklmnopqrstuvwxyz (26 characters)</p>
|
||||
<p><strong>Note:</strong> At least one character type must be selected.</p>
|
||||
</div>
|
||||
|
||||
<div class="option-detail">
|
||||
<h4><span class="option-type">boolean</span><span class="option-default">true</span>include_numbers</h4>
|
||||
<p><strong>Description:</strong> Include numeric digits (0-9) in the character set.</p>
|
||||
<p><strong>Character Set:</strong> 0123456789 (10 characters)</p>
|
||||
<p><strong>Compliance:</strong> Required by many corporate password policies.</p>
|
||||
</div>
|
||||
|
||||
<div class="option-detail">
|
||||
<h4><span class="option-type">boolean</span><span class="option-default">true</span>include_symbols</h4>
|
||||
<p><strong>Description:</strong> Include special symbols in the character set.</p>
|
||||
<p><strong>Character Set:</strong> !@#$%^&*()_+-=[]{}|;:,.<>? (25 characters)</p>
|
||||
<p><strong>Note:</strong> Some systems have restrictions on certain symbols. Validate accepted characters in your target environment.</p>
|
||||
</div>
|
||||
|
||||
<h4>Example Request</h4>
|
||||
<div class="example-request">
|
||||
POST /api/v1/passwords/generate
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"type": "high-entropy",
|
||||
"count": 2,
|
||||
"options": {
|
||||
"length": 20,
|
||||
"include_uppercase": true,
|
||||
"include_lowercase": true,
|
||||
"include_numbers": true,
|
||||
"include_symbols": false
|
||||
}
|
||||
}</div>
|
||||
|
||||
<h4>Example Response</h4>
|
||||
<div class="example-response">
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"passwords": [
|
||||
"Km9xB3nQ2pL8vR5wE6sA",
|
||||
"T7gY4hJ9kM1nP6qU8zC3"
|
||||
],
|
||||
"entropy_bits": 119.5,
|
||||
"generator_info": "High entropy generator with alphanumeric characters",
|
||||
"options_used": {
|
||||
"length": 20,
|
||||
"include_uppercase": true,
|
||||
"include_lowercase": true,
|
||||
"include_numbers": true,
|
||||
"include_symbols": false
|
||||
}
|
||||
},
|
||||
"message": "Generated 2 password(s) of type 'high-entropy'",
|
||||
"timestamp": "2025-08-23T21:24:00+02:00"
|
||||
}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- XKCD Generator -->
|
||||
<div class="generator-section">
|
||||
<div class="generator-header">
|
||||
<h3>🗣️ XKCD Pass Generator</h3>
|
||||
<p>Memorable passphrases using word combinations with multilingual support.</p>
|
||||
</div>
|
||||
<div class="generator-content">
|
||||
<h4>Purpose & Use Case</h4>
|
||||
<p>Generate memorable passphrases based on the famous XKCD comic "Password Strength". Ideal when users need to remember passwords without writing them down. Supports multiple languages for international users.</p>
|
||||
|
||||
<h4>Available Options</h4>
|
||||
|
||||
<div class="option-detail">
|
||||
<h4><span class="option-type">number</span><span class="option-default">4</span>words</h4>
|
||||
<p><strong>Range:</strong> 3-8 words</p>
|
||||
<p><strong>Description:</strong> Number of words in the passphrase.</p>
|
||||
<p><strong>Security Impact:</strong> Each additional word exponentially increases security. 4 words ≈ 52 bits, 6 words ≈ 77 bits entropy.</p>
|
||||
<p><strong>Memorability:</strong> 4-5 words strike the best balance between security and memorability.</p>
|
||||
</div>
|
||||
|
||||
<div class="option-detail">
|
||||
<h4><span class="option-type">select</span><span class="option-default">en</span>wordlist</h4>
|
||||
<p><strong>Options:</strong> en, de, de_CH, fr, it, es, pt, ja, zh</p>
|
||||
<p><strong>Description:</strong> Wordlist to use for generation.</p>
|
||||
<p><strong>Wordlist Quality:</strong> Built-in curated collections are selected per language and can be checked dynamically from the wordlist endpoint.</p>
|
||||
<p><strong>Availability:</strong> Check <code>/api/v1/passwords/wordlists</code> for current language availability.</p>
|
||||
</div>
|
||||
|
||||
<div class="option-detail">
|
||||
<h4><span class="option-type">text</span><span class="option-default">-</span>separator</h4>
|
||||
<p><strong>Description:</strong> Character(s) used to separate words in the passphrase.</p>
|
||||
<p><strong>Single Character:</strong> All separations use the same character (e.g., "word-word-word").</p>
|
||||
<p><strong>Multiple Characters:</strong> Each separation randomly selects from the character set (e.g., "word-word_word.word").</p>
|
||||
<p><strong>Space Handling:</strong> Spaces are excluded from multi-character separator sets for security.</p>
|
||||
<p><strong>Examples:</strong> "-", "_", ".", "-_.", "!@#"</p>
|
||||
</div>
|
||||
|
||||
<div class="option-detail">
|
||||
<h4><span class="option-type">boolean</span><span class="option-default">false</span>add_number</h4>
|
||||
<p><strong>Description:</strong> Add a 2-digit number to the passphrase.</p>
|
||||
<p><strong>Security Benefit:</strong> Increases entropy by ~6.6 bits (100 possible values).</p>
|
||||
<p><strong>Position Control:</strong> Use <code>number_position</code> to control placement.</p>
|
||||
</div>
|
||||
|
||||
<div class="option-detail">
|
||||
<h4><span class="option-type">select</span><span class="option-default">end</span>number_position</h4>
|
||||
<p><strong>Requires:</strong> <code>add_number: true</code></p>
|
||||
<p><strong>Options:</strong></p>
|
||||
<ul>
|
||||
<li><code>beginning</code>: "42-word-word-word"</li>
|
||||
<li><code>end</code>: "word-word-word-42"</li>
|
||||
<li><code>random</code>: "word-42-word-word" (random separator position)</li>
|
||||
</ul>
|
||||
<p><strong>Security Note:</strong> Random position provides additional unpredictability.</p>
|
||||
</div>
|
||||
|
||||
<h4>Example Request</h4>
|
||||
<div class="example-request">
|
||||
POST /api/v1/passwords/generate
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"type": "xkcdpass",
|
||||
"count": 1,
|
||||
"options": {
|
||||
"words": 5,
|
||||
"wordlist": "en",
|
||||
"separator": "-_.",
|
||||
"add_number": true,
|
||||
"number_position": "random"
|
||||
}
|
||||
}</div>
|
||||
|
||||
<h4>Example Response</h4>
|
||||
<div class="example-response">
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"passwords": ["horse-battery_42.correct_staple"],
|
||||
"explanations": ["large four-legged animal – device that stores electrical energy – free from error; accurate – basic or principal item"],
|
||||
"entropy_bits": 58.7,
|
||||
"generator_info": "XKCD-style passphrase using 5 words from en wordlist",
|
||||
"options_used": {
|
||||
"words": 5,
|
||||
"wordlist": "en",
|
||||
"separator": "-_.",
|
||||
"add_number": true,
|
||||
"number_position": "random"
|
||||
}
|
||||
},
|
||||
"message": "Generated 1 password(s) of type 'xkcdpass'",
|
||||
"timestamp": "2025-08-23T21:24:00+02:00"
|
||||
}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Add similar detailed sections for Diceware, PWGen, and Passkey generators -->
|
||||
|
||||
<!-- Security Recommendations -->
|
||||
<div class="generator-section">
|
||||
<div class="generator-header">
|
||||
<h3>🔒 Security Recommendations</h3>
|
||||
</div>
|
||||
<div class="generator-content">
|
||||
<h4>Choosing the Right Generator</h4>
|
||||
<ul>
|
||||
<li><strong>High Entropy:</strong> Maximum security with strict policy control</li>
|
||||
<li><strong>XKCD Pass:</strong> User memorability, multi-language support needed</li>
|
||||
<li><strong>Diceware:</strong> Maximum security with educational value</li>
|
||||
<li><strong>PWGen:</strong> Pronounceable passwords with balanced strength and usability</li>
|
||||
<li><strong>Passkey:</strong> Pronounceable passwords for verbal communication</li>
|
||||
</ul>
|
||||
|
||||
<h4>Entropy Guidelines</h4>
|
||||
<ul>
|
||||
<li><strong>50+ bits:</strong> Basic security (personal accounts)</li>
|
||||
<li><strong>65+ bits:</strong> Strong security (business accounts)</li>
|
||||
<li><strong>80+ bits:</strong> Excellent security (high-value accounts)</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
function switchLanguage(lang) {
|
||||
// Redirect to language-specific documentation
|
||||
const baseUrl = window.location.origin + window.location.pathname;
|
||||
const newUrl = baseUrl.replace('/docs', `/docs-${lang}`);
|
||||
window.location.href = newUrl;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user