You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
|
|
@{
|
|
Layout = null;
|
|
}
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width" />
|
|
<title>OAuth客户端请求</title>
|
|
<script src="~/Scripts/jquery-3.3.1.js"></script>
|
|
<script>
|
|
$(function () {
|
|
var baseUrl = "@ViewData["OAuthDomain"]";
|
|
var redirectDomin = "@Html.Raw(ViewData["RedictDomain"])";
|
|
var redirect_uri = encodeURI(redirectDomin + "default/Code");
|
|
var codeUrl = baseUrl + "Grant/index?client_id=1&response_type=authorization_code&redirect_uri=" + redirect_uri + "&scope=default&state=123456789";
|
|
$("a#1").click(function () {
|
|
window.location.href = codeUrl;
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div>
|
|
<h1>OAuth客户端请求例子</h1>
|
|
<ul>
|
|
<li>
|
|
<a id="1" href="#">授权码模式</a>
|
|
<a id="2" href="#">简化模式</a>
|
|
<a id="3" href="#">用户名密码模式</a>
|
|
<a id="4" href="#">客户端模式</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|