-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from cgmarcos-autentia/feature/fixing-samples
Feature/fixing samples
- Loading branch information
Showing
7 changed files
with
112 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
153 changes: 76 additions & 77 deletions
153
...i/src/main/resources/templates/index.html → ...src/main/resources/templates/session.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,77 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"> | ||
<head> | ||
<title data-th-text="${@config.topbarTitle}"></title> | ||
|
||
<link rel="stylesheet" media="screen" data-th-href="@{/webjars/bootstrap/css/bootstrap.min.css}" /> | ||
<link rel="stylesheet" type="text/css" media="screen" data-th-href="@{/webjars/font-awesome/css/font-awesome.min.css}" /> | ||
|
||
<style type="text/css"> | ||
.container { | ||
margin-top: 10%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h3 class="panel-title" data-th-text="${@config.topbarTitle}"></h3> | ||
</div> | ||
|
||
<div data-sec-authorize="isAnonymous()" class="panel-body"> | ||
<form role="form" data-th-action="@{/login}" method="POST"> | ||
<fieldset> | ||
<div class="form-group"> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa fa-user" aria-hidden="true"></i></span> | ||
<input class="form-control" data-th-value="${login_hint}" placeholder="User Name" name="username" type="text" required="true" autofocus="true" autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false" /> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa fa-lock" aria-hidden="true"></i></span> | ||
<input class="form-control" placeholder="Password" name="password" type="password" value="" required="true" autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false" /> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<input type="hidden" data-th-name="${_csrf.parameterName}" data-th-value="${_csrf.token}" /> <input type="submit" class="btn btn-lg btn-success btn-block" name="submit" value="Login" /> | ||
</div> | ||
<div data-th-if="${param.error}" class="alert alert-danger">Invalid username and password.</div> | ||
<div data-th-if="${param.logout}" class="alert alert-info">You have been logged out.</div> | ||
<div data-th-if="${param.denied}" class="alert alert-warning">Your session timed out, please retry.</div> | ||
</fieldset> | ||
</form> | ||
</div> | ||
|
||
<div data-sec-authorize="isFullyAuthenticated()" class="panel-body"> | ||
<div class="panel-group alert alert-info"> | ||
You are logged in as '<span data-sec-authentication="name"></span>' | ||
</div> | ||
<div class="panel-group"> | ||
<form role="form" data-th-action="@{/logout}" method="POST"> | ||
<fieldset> | ||
<input type="hidden" data-th-name="${_csrf.parameterName}" data-th-value="${_csrf.token}" /> <input type="submit" class="btn btn-success btn-block" name="submit" value="Logout" /> | ||
</fieldset> | ||
</form> | ||
</div> | ||
</div> | ||
|
||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
<a data-th-href="@{/authorize(response_type='code token id_token',client_id='client',redirect_uri='http://localhost:8080/sampleclient', scope='openid profile email', state='randomstate', nonce='randomnonce')}">Sample OpenID Connect Authorize Call</a> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript" data-th-src="@{/webjars/jquery/jquery.min.js}"></script> | ||
<script type="text/javascript" data-th-src="@{/webjars/bootstrap/js/bootstrap.min.js}"></script> | ||
|
||
</body> | ||
<!DOCTYPE html> | ||
<html xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"> | ||
<head> | ||
<title data-th-text="${@config.topbarTitle}"></title> | ||
|
||
<link rel="stylesheet" media="screen" data-th-href="@{/resources/bootstrap2/css/bootstrap.min.css}" /> | ||
<!--<link rel="stylesheet" type="text/css" media="screen" data-th-href="@{/webjars/font-awesome/css/font-awesome.min.css}" />--> | ||
|
||
<style type="text/css"> | ||
.container { | ||
margin-top: 10%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h3 class="panel-title" data-th-text="${@config.topbarTitle}"></h3> | ||
</div> | ||
<div data-sec-authorize="isAnonymous()" class="panel-body"> | ||
<form role="form" data-th-action="@{/login}" method="POST"> | ||
<fieldset> | ||
<div class="form-group"> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa fa-user" aria-hidden="true"></i></span> | ||
<input class="form-control" data-th-value="${login_hint}" placeholder="User Name" name="username" type="text" required="true" autofocus="true" autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false" /> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa fa-lock" aria-hidden="true"></i></span> | ||
<input class="form-control" placeholder="Password" name="password" type="password" value="" required="true" autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false" /> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<input type="hidden" data-th-name="${_csrf.parameterName}" data-th-value="${_csrf.token}" /> <input type="submit" class="btn btn-lg btn-success btn-block" name="submit" value="Login" /> | ||
</div> | ||
<div data-th-if="${param.error}" class="alert alert-danger">Invalid username and password.</div> | ||
<div data-th-if="${param.logout}" class="alert alert-info">You have been logged out.</div> | ||
<div data-th-if="${param.denied}" class="alert alert-warning">Your session timed out, please retry.</div> | ||
</fieldset> | ||
</form> | ||
</div> | ||
|
||
<div data-sec-authorize="isFullyAuthenticated()" class="panel-body"> | ||
<div class="panel-group alert alert-info"> | ||
You are logged in as '<span data-sec-authentication="name"></span>' | ||
</div> | ||
<div class="panel-group"> | ||
<form role="form" data-th-action="@{/logout}" method="POST"> | ||
<fieldset> | ||
<input type="hidden" data-th-name="${_csrf.parameterName}" data-th-value="${_csrf.token}" /> <input type="submit" class="btn btn-success btn-block" name="submit" value="Logout" /> | ||
</fieldset> | ||
</form> | ||
</div> | ||
</div> | ||
|
||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
<a data-th-href="@{/authorize(response_type='code token id_token',client_id='client',redirect_uri='http://localhost:8080/sampleclient', scope='openid profile email', state='randomstate', nonce='randomnonce')}">Sample OpenID Connect Authorize Call</a> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript" data-th-src="@{/resources/js/lib/jquery/jquery.min.js}"></script> | ||
<script type="text/javascript" data-th-src="@{/resources/bootstrap2/js/bootstrap.min.js}"></script> | ||
|
||
</body> | ||
</html> |