Files
apostol-dm/www/welcome/index.html
Преподобный Ален 8a20f01b73 Committing updates.
2021-10-01 20:35:20 +03:00

112 lines
4.6 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="ru">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="description" content="BitDeals: Авторизация">
<!-- Required meta tags -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- SignIn -->
<meta name="signin-scope" content="bitdeals">
<meta name="signin-client_id" content="web-bitdeals.org">
<title>Авторизация | BitDeals (Deal module)</title>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="/assets/vendor/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="/assets/css/main.min.css">
<link href="/assets/css/main.css" rel="stylesheet" type="text/css">
<link href="/assets/css/floating-labels.css" rel="stylesheet" type="text/css">
<meta name="theme-color" content="#252627">
<meta itemprop="name" content="Crypto Payment Service">
<meta itemprop="description" content="BitDeals Crypto Payment Service">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Crypto Payment Service">
<meta name="twitter:description" content="BitDeals Crypto Payment Service">
</head>
<body class="dark-theme">
<div class="container">
<div class="form-signin">
<form id="formSignIn" class="needs-validation" novalidate>
<div class="text-center mb-4">
<h1 class="h3 mb-3 font-weight-normal">Добро пожаловать в BitDeals </h1>
</div>
<button id="btnSignIn" class="btn btn-lg btn-primary btn-block" type="button" onclick="oauthSignIn()">Войти</button>
<div id="alertMessage" class="text-center invalid-feedback">
</div>
<div id="g-signin2" class="mt-3" data-width="200" data-height="48" data-longtitle="false"></div>
<div class="text-center mb-4">
<p class="text-center">Продолжая, вы соглашаетесь с <a href="#">Условиями использования</a> и <a href="#">Политикой конфиденциальности</a>.</p>
</div>
<hr class="my-1">
<p class="mt-3 text-muted text-center">© BitDeals 2020</p>
</form>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="/assets/vendor/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
<script>
/*
* Create and send form to server.
*/
function SendForm(params, action, method = 'GET') {
// Create <form> element to submit parameters.
let form = document.createElement('form');
form.setAttribute('method', method);
form.setAttribute('action', action);
// Add form parameters as hidden input values.
for (let i in params) {
let input = document.createElement('input');
input.setAttribute('type', 'hidden');
input.setAttribute('name', i);
input.setAttribute('value', params[i]);
form.appendChild(input);
}
console.log(form);
// Add form to page and submit.
document.body.appendChild(form);
form.submit();
}
/*
* Create form to request access token from BitDeals's OAuth 2.0 server.
*/
function oauthSignIn() {
let oauth2Endpoint = 'http://localhost:4977/oauth2/authorize';
// Parameters to pass to OAuth 2.0 endpoint.
let params = {
client_id: $("meta[name='signin-client_id']").attr("content"),
//redirect_uri: 'https://dm.bitdials.org/dashboard/',
redirect_uri: 'http://localhost:4999/dashboard/',
response_type: 'token',
scope: $("meta[name='signin-scope']").attr("content"),
state: 'SignIn'
};
SendForm(params, oauth2Endpoint);
}
$(document).ready(function() {
document.location.replace('/dashboard');
});
</script>
</body>
</html>