Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pks'
Browse files Browse the repository at this point in the history
# Conflicts:
#	package.json
#	src/background.ts
#	src/crypto.ts
#	src/utils.ts
#	src/webauthn.ts
  • Loading branch information
Blobonat committed Nov 3, 2020
2 parents 6dd6ede + 0a4c5c5 commit 3ff2bdb
Show file tree
Hide file tree
Showing 25 changed files with 2,510 additions and 1,053 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ $ npm run watch

# Loading into the browser

You can load the project as an unpacked extension. Upon building, you may load the directory `dist/chromium/` into your browser. More details on how to do this [here](https://developer.chrome.com/extensions/getstarted).
You can load the project as an unpacked extension. Upon building, you may load the directory `dist/chromium/` into your browser. More details on how to do this [here](https://developer.chrome.com/extensions/getstarted).

# PSK Protocol Support

- Support for PSK WebAuthn Extension
- Support for PSK Setup API
7 changes: 6 additions & 1 deletion dist/chromium/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
"js/background.js"
]
},
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
"options_page": "options.html",
"options_ui": {
"page": "options.html",
"open_in_tab": false
},
"content_security_policy": "script-src 'self' https://code.jquery.com https://cdnjs.cloudflare.com https://cdn.jsdelivr.net https://stackpath.bootstrapcdn.com 'unsafe-eval'; object-src 'self'",
"page_action": {
"default_icon": {
"16": "images/lock-16.png",
Expand Down
50 changes: 50 additions & 0 deletions dist/chromium/options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Identity Manager</title>

<!-- Bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.js" integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.3.0/jquery.form.min.js" integrity="sha384-qlmct0AOBiA2VPZkMY3+2WqkHtIQ9lSdAsAn5RUJD/3vA5MKDgSGcdmIv4ycVxyn" 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="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>

<!-- Custom CSS -->
<link href="styles/options.css" type="text/css" rel="stylesheet">

<!-- Custom JS -->
<script type="text/javascript" src="js/options.js"></script>
</head>
<body class="text-center">

<div class="cover-container d-flex h-100 p-3 mx-auto flex-column">

<main role="main" class="inner cover">
<h1 class="cover-heading">PSK Options</h1>
<p class="lead">
<button type="button" id="Pin" class="btn btn-lg btn-secondary">Set PIN</button>
<button type="button" id="Sync" class="btn btn-lg btn-secondary">Sync</button>
</p>
<div class="lead">
<div class="lead">
Backup Device Contact URL <input type="text" class="form-control" id="BackupDeviceUrl"/>
</div>
<br>
<p class="lead">
<button type="button" id="SaveOptions" class="btn btn-lg btn-secondary">Save</button>
</p>
</div>
</main>

<footer class="mastfoot mt-auto">
<div class="inner">
<p>&copy; 2020</p>
</div>
</footer>
</div>


</body>
</html>
7 changes: 2 additions & 5 deletions dist/chromium/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@

<body id="wrapper">
<div id="dialog">
<span>Please create a 4-digit pin for <span id="domain"></span></span>
<span>Consent for <span id="domain"></span></span>
<div id="form">
<input type="text" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}" />
<input type="text" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}" />
<input type="text" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}" />
<input type="text" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}" />
<button id="userConsent">Give consent</button>
</div>
</div>
</body>
Expand Down
111 changes: 111 additions & 0 deletions dist/chromium/styles/options.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/*
* Globals
*/

/* Links */
a,
a:focus,
a:hover {
color: #fff;
}

/* Custom default button */
.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus {
color: #333;
text-shadow: none; /* Prevent inheritance from `body` */
background-color: #fff;
border: .05rem solid #fff;
}


/*
* Base structure
*/

html,
body {
height: 100%;
background-color: #333;
}

body {
display: -ms-flexbox;
display: -webkit-box;
display: flex;
-ms-flex-pack: center;
-webkit-box-pack: center;
justify-content: center;
color: #fff;
text-shadow: 0 .05rem .1rem rgba(0, 0, 0, .5);
box-shadow: inset 0 0 5rem rgba(0, 0, 0, .5);
}

.cover-container {
max-width: 42em;
}


/*
* Header
*/
.masthead {
margin-bottom: 2rem;
}

.masthead-brand {
margin-bottom: 0;
}

.nav-masthead .nav-link {
padding: .25rem 0;
font-weight: 700;
color: rgba(255, 255, 255, .5);
background-color: transparent;
border-bottom: .25rem solid transparent;
}

.nav-masthead .nav-link:hover,
.nav-masthead .nav-link:focus {
border-bottom-color: rgba(255, 255, 255, .25);
}

.nav-masthead .nav-link + .nav-link {
margin-left: 1rem;
}

.nav-masthead .active {
color: #fff;
border-bottom-color: #fff;
}

@media (min-width: 250px) {
.masthead-brand {
float: left;
}
.nav-masthead {
float: right;
}
}


/*
* Cover
*/
.cover {
padding: 0 1.5rem;
}
.cover .btn-lg {
padding: .75rem 1.25rem;
font-weight: 700;
}


/*
* Footer
*/
.mastfoot {
color: rgba(255, 255, 255, .5);
}

Loading

0 comments on commit 3ff2bdb

Please sign in to comment.