Skip to content

Instantly share code, notes, and snippets.

View melvincarvalho's full-sized avatar
💭
I may be slow to respond.

Melvin Carvalho melvincarvalho

💭
I may be slow to respond.
View GitHub Profile
[
"076161ca22da5a2ab8c74465cbf08f79f3e7e8bb31f4dc211bd94319ebade03d",
"5a462fa6044b4b8da318528a6987a45e3adf832bd1c64bd6910eacfecdf07541",
"1bbb8324577ac089607e45813bac499ebdab4621d029f8c02b2c82b4410fd3f4",
"e9e4276490374a0daf7759fd5f475deff6ffb9b0fc5fa98c902b5f4b2fe3bba2",
"887645fef0ce0c3c1218d2f5d8e6132a19304cdc57cd20281d082f38cfea0072",
"ce5061bfcc16476b9bde3f1d5b3ec7730c4361cf8c827fbd9c14eb8c7003a1de",
"22e804d26ed16b68db5259e78449e96dab5d464c8f470bda3eb1a70467f2c793",
"ff24202025283c90d05337559b8ad7e3e0b811726d1cbb400a9b698cd7a01780",
"b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9",
@melvincarvalho
melvincarvalho / index.html
Created September 19, 2018 08:57 — forked from bellbind/index.html
[solid][browser] pastebins app from tutorial doc
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script
src="https://solid.github.io/releases/solid.js/solid-client.min.js"
></script>
<script type="module" src="./main.js"></script>
<style>
li > input:checked ~ .child {display: none;}
@melvincarvalho
melvincarvalho / index.html
Last active September 19, 2018 09:03 — forked from bellbind/index.html
[solid][browser] elementary app with solid-auth-client library
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://solid.github.io/solid-auth-client/dist/solid-auth-client.bundle.js"></script>
<script type="module" src="./main.js"></script>
<style>
#login {display: none;}
#webid:empty ~ #login {display: inline;}
#webid:empty ~ #logout {display: none;}
@melvincarvalho
melvincarvalho / solidauth.md
Created February 9, 2016 01:20 — forked from sandhawke/solidauth.md
Solid Auth

Scenario: Alice, using her browser, wants to access resources on server bob.example, authenticating herself as the owner of server alice.example (or a specific resource on it)

Original answer: use WebID-TLS. But support in the browser has issues, so what are some alternatives?

Basic Approaches

  1. Proxy-TLS: Alice talks to her pod, while her pod uses WebID-TLS to talk to bob.example. Her secret key remains on her pod.
  2. Digital Signatures: Alice signs her request to bob.example using a (non-TLS) private key; bob verifies with public key obtained from alice.example
  3. Token Confirmation: A secret bearer token passes through all three parties, confirming to bob.example that the client controls alice.example
<!DOCTYPE html>
<html>
<head>
<title>User Registration</title>
<script src="bitcorelatest.js"></script>
<script>
// Derive given private key index..
function get_bip32_key(path) {
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;