/
codemaster
/
a-pass-oauth
Обзор
Документация
Войти
/
codemaster
/
a-pass-oauth
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
html/consent.html
220 строк
8 KB
mich-master
2512
25 дек 2025, 17:51
25 дек 2025, 17:51
80642a3
Код
Авторство
О чём код?
<!DOCTYPE html> <html lang="ru"> <html> <head> <meta charset="UTF-8"> <title>Authorize Application</title> <style> body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; justify-content: center; align-items: center; margin: 0; padding: 20px; } .consent-container { background: white; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); max-width: 500px; width: 100%; overflow: hidden; } .consent-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; text-align: center; } .consent-header h1 { margin: 0; font-size: 24px; font-weight: 600; } .consent-header p { margin: 10px 0 0; opacity: 0.9; font-size: 16px; } .consent-body { padding: 30px; } .user-info { display: flex; align-items: center; background: #f8f9fa; padding: 15px; border-radius: 12px; margin-bottom: 25px; } .user-avatar { width: 50px; height: 50px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 20px; font-weight: bold; margin-right: 15px; } .user-details h3 { margin: 0; color: #333; font-size: 18px; } .user-details p { margin: 5px 0 0; color: #666; font-size: 14px; } .scope-list { background: #f8f9fa; border-radius: 12px; padding: 20px; margin: 25px 0; } .scope-list h3 { margin: 0 0 15px; color: #333; font-size: 18px; } .scope-item { display: flex; align-items: flex-start; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #e9ecef; } .scope-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } .scope-icon { color: #667eea; font-size: 20px; margin-right: 12px; margin-top: 2px; } .scope-details h4 { margin: 0 0 5px; color: #333; font-size: 16px; } .scope-details p { margin: 0; color: #666; font-size: 14px; line-height: 1.4; } .consent-actions { display: flex; gap: 15px; margin-top: 30px; } .consent-button { flex: 1; padding: 16px; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-align: center; text-decoration: none; display: inline-block; } .button-deny { background: #f8f9fa; color: #666; border: 2px solid #e9ecef; } .button-deny:hover { background: #e9ecef; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); } .button-allow { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; } .button-allow:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4); } .powered-by { text-align: center; margin-top: 20px; color: #999; font-size: 12px; } </style> </head> <body> <div class="consent-container"> <div class="consent-header"> <h1>Авторизация сервиса</h1> <p>{{clientname}}</p> </div> <div class="consent-body"> <div class="user-info"> <div class="user-avatar"> {{usersym}} </div> <div class="user-details"> <h3>Привет, {{params.username}}!</h3> <p>Вы вошли как {{params.username}}</p> </div> </div> <p style="color: #666; margin-bottom: 20px; line-height: 1.6;"> <strong>{{params.username}}</strong> запрашивает доступ к вашей учетной записи. Это позволит приложению: </p> <div class="scope-list"> <h3>Запрашиваемые разрешения</h3> {{scopehtml}} </div> <p style="color: #666; font-size: 14px; line-height: 1.6;"> Нажимая "Согласен", вы авторизуете этот сервис для доступа согласно разрешениям, показанным ниже. Вы можете отозвать эти разрешения в любое время. </p> <div class="consent-actions"> <form method="POST" action="/oauth/authorize" style="flex: 1;"> <input type="hidden" name="client_id" value="{{params.client_id}}"> <input type="hidden" name="redirect_uri" value="{{params.redirect_uri}}"> <input type="hidden" name="state" value="{{params.state}}"> <input type="hidden" name="response_type" value="{{params.response_type}}"> <input type="hidden" name="scope" value="{{params.scope}}"> <input type="hidden" name="code_challenge" value="{{query.code_challenge}}"> <input type="hidden" name="code_challenge_method" value="{{query.code_challenge_method}}"> <!-- <input type="hidden" name="session_id" value="{{params.session_id}}"> --> <button type="submit" name="action" value="deny" class="consent-button button-deny"> Отклонить </button> <button type="submit" name="action" value="allow" class="consent-button button-allow"> Согласен </button> </form> </div> <div class="powered-by"> Powered by OAuth 2.1 Server • Secure Authorization </div> </div> </div> </body> </html>