-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
335 additions
and
63 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package: github.com/CenterForOpenScience/fakecas | ||
import: | ||
- package: github.com/labstack/echo | ||
subpackages: | ||
- engine/standard | ||
- middleware | ||
- package: github.com/rs/cors | ||
- package: gopkg.in/mgo.v2 | ||
subpackages: | ||
- bson |
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,49 +1,65 @@ | ||
package main | ||
|
||
var UNREGISTERED = `<html lang="en" class=" js no-mobile desktop no-ie chrome chrome49 root-section gradient rgba opacity textshadow multiplebgs boxshadow borderimage borderradius cssreflections csstransforms csstransitions no-touch no-retina fontface domloaded w-2307 gt-240 gt-320 gt-480 gt-640 gt-768 gt-800 gt-1024 gt-1280 gt-1440 gt-1680 gt-1920 no-portrait landscape" id="login-page"><head> | ||
<meta charset="UTF-8"> | ||
var LOGINPAGE = `{{define "login"}} | ||
<title>Open Science Framework | Sign In</title> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Open Science Framework | Sign In</title> | ||
</head> | ||
<link rel="stylesheet" href="//staging-accounts.osf.io/css/cas.css"> | ||
<link rel="icon" href="//staging-accounts.osf.io/favicon.ico" type="image/x-icon"> | ||
<!--[if lt IE 9]> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script> | ||
<![endif]--><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | ||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script><style type="text/css">@media print{.lpiframeoverlay{display:none}}</style></head> | ||
<body id="cas"><div id="lptopspacer80974089" style="height: 40px;"></div> | ||
<div id="container"> | ||
<header> | ||
<a id="logo" href="" title="Open Science Framework Sign In">Open Science Framework | Sign In</a> | ||
</header> | ||
<div id="content"> | ||
<div id="msg" class="errors"> | ||
<body> | ||
<div id="header"> | ||
<span><h3>Open Science Framework | fakeCAS</h3></span> | ||
<br> | ||
</div> | ||
<h2>Account has not been confirmed.</h2> | ||
<p>This login email has been registered but not confirmed. Please check your email (and spam folder). <a href="https://staging.osf.io/resend/">Click here</a> to resend your confirmation email.</p> | ||
</div> | ||
{{if .NotRegistered}} | ||
<div id="message"> | ||
<p>This login email has been registered but not confirmed. Please check your email (and spam folder). <a href={{.OSFResendConfirmation}}>Click here</a> to resend your confirmation email.</p> | ||
</div> | ||
{{end}} | ||
<div class="row" style="text-align: center;"> | ||
<hr> | ||
<a href="https://staging.osf.io/">Back to OSF</a> | ||
{{if .NotAuthorized}} | ||
<div id="message"> | ||
<p>The service you attempted to authenticate to is not authorized to use CAS.</p> | ||
</div> | ||
</div> <!-- END #content --> | ||
{{end}} | ||
<footer> | ||
<div class="copyright"> | ||
<div class="row"> | ||
<p>Copyright © 2011-2015 <a href="http://centerforopenscience.org">Center for Open Science</a> | | ||
<a href="https://github.com/CenterForOpenScience/centerforopenscience.org/blob/master/TERMS_OF_USE.md">Terms of Use</a> | | ||
<a href="https://github.com/CenterForOpenScience/centerforopenscience.org/blob/master/PRIVACY_POLICY.md">Privacy Policy</a> | ||
</p> | ||
</div> | ||
{{if .NotValid}} | ||
<p>Invalid request. User does not exist or invalid/expired validation key.</p> | ||
{{end}} | ||
{{if .LoginForm}} | ||
<div id="forms"> | ||
<form id="login" action="{{.CASLogin}}" method="post"> | ||
<section> | ||
<span>Email:</span> | ||
<input id="username" name="username" type="text" value="" size="" /> | ||
<input id="submit" type="submit" value="Sign In" /> | ||
{{if .NotExist}} | ||
<span>User does not exist.</span> | ||
{{end}} | ||
</section> | ||
<section hidden> | ||
<br> | ||
<span>Password:</span> | ||
<input id="password", name="password", type="password", value="" /> | ||
<input id="persistence" name="persistence", type="checkbox" value="true" checked /> | ||
<label id="for-persistence">Stay Signed In</label> | ||
</section> | ||
</form> | ||
</div> | ||
{{end}} | ||
<br> | ||
<div id="links"> | ||
<section> | ||
<a id="forgot-password" href={{.OSFForgotPassword}}>Forgot Your Password?</a><br> | ||
<a id="institution-login" href={{.OSFInstitutionLogin}}>Login Through Your Institution</a><br> | ||
<a id="back-to-osf" href={{.OSFDomain}}>Back to OSF</a><br> | ||
<a id="create-account" href={{.OSFCreateAccount}}>Create Account</a> | ||
</section> | ||
</div> | ||
</footer> | ||
</body> | ||
</html> | ||
</div> <!-- END #container --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headjs/1.0.3/head.min.js"></script> | ||
<script type="text/javascript" src="//staging-accounts.osf.io/js/cas.js"></script>` | ||
{{end}}` |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{{define "login"}} | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Open Science Framework | Sign In</title> | ||
</head> | ||
|
||
<body> | ||
<div id="header"> | ||
<span><h3>Open Science Framework | fakeCAS</h3></span> | ||
<br> | ||
</div> | ||
|
||
{{if .NotRegistered}} | ||
<div id="message"> | ||
<p>This login email has been registered but not confirmed. Please check your email (and spam folder). <a href={{.OSFResendConfirmation}}>Click here</a> to resend your confirmation email.</p> | ||
</div> | ||
{{end}} | ||
|
||
{{if .NotAuthorized}} | ||
<div id="message"> | ||
<p>The service you attempted to authenticate to is not authorized to use CAS.</p> | ||
</div> | ||
{{end}} | ||
|
||
{{if .NotValid}} | ||
<p>Invalid request. User does not exist or invalid/expired validation key.</p> | ||
{{end}} | ||
{{if .LoginForm}} | ||
<div id="forms"> | ||
<form id="login" action="{{.CASLogin}}" method="post"> | ||
<section> | ||
<span>Email:</span> | ||
<input id="username" name="username" type="text" value="" size="" /> | ||
<input id="submit" type="submit" value="Sign In" /> | ||
{{if .NotExist}} | ||
<span>User does not exist.</span> | ||
{{end}} | ||
</section> | ||
<section hidden> | ||
<br> | ||
<span>Password:</span> | ||
<input id="password", name="password", type="password", value="" /> | ||
<input id="persistence" name="persistence", type="checkbox" value="true" checked /> | ||
<label id="for-persistence">Stay Signed In</label> | ||
</section> | ||
</form> | ||
</div> | ||
{{end}} | ||
<br> | ||
<div id="links"> | ||
<section> | ||
<a id="forgot-password" href={{.OSFForgotPassword}}>Forgot Your Password?</a><br> | ||
<a id="institution-login" href={{.OSFInstitutionLogin}}>Login Through Your Institution</a><br> | ||
<a id="back-to-osf" href={{.OSFDomain}}>Back to OSF</a><br> | ||
<a id="create-account" href={{.OSFCreateAccount}}>Create Account</a> | ||
</section> | ||
</div> | ||
</body> | ||
</html> | ||
|
||
{{end}} |
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
Oops, something went wrong.