mirror of
https://github.com/caperren/school_archives.git
synced 2025-11-09 21:51:15 +00:00
Added new coursework, cleaned up structure
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="icon" href="../favicon.ico">
|
||||
|
||||
<title>CS 496</title>
|
||||
|
||||
<link href="/resources/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/resources/libs/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
|
||||
<link href="/framework/ie10-viewport-bug-workaround.css" rel="stylesheet">
|
||||
<link href="/framework/gaccount_theme.css" rel="stylesheet">
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container theme-showcase" role="main">
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1 align="center">CS 496 OAUTH 2 Demo Site</h1>
|
||||
<h2 align="center">Google Account Page</h2>
|
||||
</div>
|
||||
|
||||
<div class="jumbotron">
|
||||
<p align="left">Below you can see the first name, last name, and url to the google account linked via OAuth 2.</p>
|
||||
</div>
|
||||
|
||||
<div id="gplus-output">
|
||||
<p>
|
||||
First Name: {{first_name}}<br>
|
||||
Last Name: {{last_name}}<br>
|
||||
Google Plus URL: <a href="{{gplus_url}}">{{gplus_url}}</a><br><br>
|
||||
State Variable: {{state_var}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="../resources/libs/bootstrap/assets/js/vendor/jquery.min.js"><\/script>')</script>
|
||||
<script src="../resources/libs/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="../resources/libs/bootstrap/js/docs.min.js"></script>
|
||||
<script src="/framework/ie10-viewport-bug-workaround.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
body {
|
||||
padding-top: 70px;
|
||||
padding-bottom: 30px;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.theme-dropdown .dropdown-menu {
|
||||
position: static;
|
||||
display: block;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.theme-showcase > p > .btn {
|
||||
margin: 5px auto;
|
||||
}
|
||||
|
||||
.theme-showcase .navbar .container {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#gplus-output {
|
||||
color: lightgray;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
||||
/*!
|
||||
* IE10 viewport hack for Surface/desktop Windows 8 bug
|
||||
* Copyright 2014-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
/*
|
||||
* See the Getting Started docs for more information:
|
||||
* http://getbootstrap.com/getting-started/#support-ie10-width
|
||||
*/
|
||||
@-ms-viewport { width: device-width; }
|
||||
@-o-viewport { width: device-width; }
|
||||
@viewport { width: device-width; }
|
||||
@@ -0,0 +1,23 @@
|
||||
/*!
|
||||
* IE10 viewport hack for Surface/desktop Windows 8 bug
|
||||
* Copyright 2014-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
// See the Getting Started docs for more information:
|
||||
// http://getbootstrap.com/getting-started/#support-ie10-width
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
||||
var msViewportStyle = document.createElement('style')
|
||||
msViewportStyle.appendChild(
|
||||
document.createTextNode(
|
||||
'@-ms-viewport{width:auto!important}'
|
||||
)
|
||||
)
|
||||
document.querySelector('head').appendChild(msViewportStyle)
|
||||
}
|
||||
|
||||
})();
|
||||
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="icon" href="../favicon.ico">
|
||||
|
||||
<title>CS 496</title>
|
||||
|
||||
<link href="/resources/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/resources/libs/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
|
||||
<link href="/framework/ie10-viewport-bug-workaround.css" rel="stylesheet">
|
||||
<link href="/framework/index_theme.css" rel="stylesheet">
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container theme-showcase" role="main">
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1 align="center">CS 496 OAUTH 2 Demo Site</h1>
|
||||
<h2 align="center">Home Page</h2>
|
||||
<p align="center">This site is a demo for manually using OAUTH 2 to authenticate a user account with a GAE site.</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<button type="button" class="btn btn-lg btn-primary center-block" id="auth_button">Authenticate Google Account</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button type="button" class="btn btn-lg btn-primary center-block" id="view_gaccount_button">View Google Plus Information</button>
|
||||
</p>
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="../resources/libs/bootstrap/assets/js/vendor/jquery.min.js"><\/script>')</script>
|
||||
<script src="../resources/libs/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="../resources/libs/bootstrap/js/docs.min.js"></script>
|
||||
<script src="/framework/ie10-viewport-bug-workaround.js"></script>
|
||||
<script src="/framework/hashes.js"></script>
|
||||
<script src="/framework/index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Created by Corwin Perren on 7/21/2017.
|
||||
*/
|
||||
|
||||
function random_string(len) {
|
||||
var char_set = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||
var random_string = '';
|
||||
for (var i = 0; i < len; i++) {
|
||||
var random_position = Math.floor(Math.random() * char_set.length);
|
||||
random_string += char_set.substring(random_position, random_position+1);
|
||||
}
|
||||
return random_string;
|
||||
}
|
||||
|
||||
function on_auth_button_clicked(){
|
||||
var SHA256 = new Hashes.SHA256();
|
||||
var rand_state = SHA256.hex(random_string(1024));
|
||||
window.location.replace('/lauth?state=' + rand_state);
|
||||
}
|
||||
|
||||
function on_view_gaccount_button_clicked() {
|
||||
window.location.replace('/gaccount');
|
||||
}
|
||||
|
||||
function assign_window_event_handlers() {
|
||||
document.getElementById("auth_button").addEventListener("click", on_auth_button_clicked)
|
||||
document.getElementById("view_gaccount_button").addEventListener("click", on_view_gaccount_button_clicked)
|
||||
}
|
||||
|
||||
function setup_page_on_load() {
|
||||
assign_window_event_handlers();
|
||||
}
|
||||
|
||||
window.addEventListener("load", setup_page_on_load);
|
||||
@@ -0,0 +1,19 @@
|
||||
body {
|
||||
padding-top: 70px;
|
||||
padding-bottom: 30px;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.theme-dropdown .dropdown-menu {
|
||||
position: static;
|
||||
display: block;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.theme-showcase > p > .btn {
|
||||
margin: 5px auto;
|
||||
}
|
||||
|
||||
.theme-showcase .navbar .container {
|
||||
width: auto;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="icon" href="../favicon.ico">
|
||||
|
||||
<title>CS 496</title>
|
||||
|
||||
<link href="/resources/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/resources/libs/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
|
||||
<link href="/framework/ie10-viewport-bug-workaround.css" rel="stylesheet">
|
||||
<link href="/framework/index_theme.css" rel="stylesheet">
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container theme-showcase" role="main">
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1 align="center">CS 496 OAUTH 2 Demo Site</h1>
|
||||
<h2 align="center">Error! Account Not Authorized!</h2>
|
||||
<p align="center">Please use your back button, or the link below to return to the home page and authorize your google account.</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<button onclick="window.location.replace('/')" type="button" class="btn btn-lg btn-primary center-block">Home</button>
|
||||
</p>
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="../resources/libs/bootstrap/assets/js/vendor/jquery.min.js"><\/script>')</script>
|
||||
<script src="../resources/libs/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="../resources/libs/bootstrap/js/docs.min.js"></script>
|
||||
<script src="/framework/ie10-viewport-bug-workaround.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user