merge with daplie.me
This commit is contained in:
		
						commit
						5719f6a78e
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -1,3 +1,4 @@
 | 
			
		||||
*.*sw*
 | 
			
		||||
bower_components/
 | 
			
		||||
assets/
 | 
			
		||||
.DS_Store
 | 
			
		||||
 | 
			
		||||
@ -445,3 +445,6 @@ span.dap-small-text.js-scope-desc.noselect {
 | 
			
		||||
  color : #808080;
 | 
			
		||||
  color : rgb(128, 128, 128);
 | 
			
		||||
}
 | 
			
		||||
.error-msg {
 | 
			
		||||
  color: #FDA748;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								img/.DS_Store
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								img/.DS_Store
									
									
									
									
										vendored
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										49
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										49
									
								
								index.html
									
									
									
									
									
								
							@ -1,30 +1,30 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
    <head>
 | 
			
		||||
        <meta charset="utf-8">
 | 
			
		||||
        <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
			
		||||
        <title>Login Facilitator: OAuth3.org</title>
 | 
			
		||||
        <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
 | 
			
		||||
	      <!-- <link rel="stylesheet" type="text/css" href="/css/style.css"> -->
 | 
			
		||||
        <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Lato:300">
 | 
			
		||||
        <script src="https://use.fontawesome.com/3af0faae66.js"></script>
 | 
			
		||||
        <link rel="stylesheet" type="text/css" href="/css/daplie-installer-overrides.css">
 | 
			
		||||
    </head>
 | 
			
		||||
  <head>
 | 
			
		||||
    <meta charset="utf-8">
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
			
		||||
    <title>Login Facilitator: OAuth3.org</title>
 | 
			
		||||
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
 | 
			
		||||
    <!-- <link rel="stylesheet" type="text/css" href="/css/style.css"> -->
 | 
			
		||||
    <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Lato:300">
 | 
			
		||||
    <script src="https://use.fontawesome.com/3af0faae66.js"></script>
 | 
			
		||||
    <link rel="stylesheet" type="text/css" href="/css/daplie-installer-overrides.css">
 | 
			
		||||
  </head>
 | 
			
		||||
 | 
			
		||||
    <body class="fade mock-main">
 | 
			
		||||
  <body class="fade mock-main">
 | 
			
		||||
 | 
			
		||||
        <!-- STEP 1: ask the user where they want to log in -->
 | 
			
		||||
        <!-- STEP 2: ask the user for their email -->
 | 
			
		||||
        <!-- STEP 3+4: ask for login code and to remember device -->
 | 
			
		||||
        <!-- TODO: remember-me-not implementation? -->
 | 
			
		||||
    <!-- STEP 1: ask the user where they want to log in -->
 | 
			
		||||
    <!-- STEP 2: ask the user for their email -->
 | 
			
		||||
    <!-- STEP 3+4: ask for login code and to remember device -->
 | 
			
		||||
    <!-- TODO: remember-me-not implementation? -->
 | 
			
		||||
 | 
			
		||||
        <!--  <button class="btn btn-secondary js-authz-show js-authz-remember-me-not">Just this once</button>-->
 | 
			
		||||
    <!--  <button class="btn btn-secondary js-authz-show js-authz-remember-me-not">Just this once</button>-->
 | 
			
		||||
 | 
			
		||||
        <!-- Step 5: ask for permissions -->
 | 
			
		||||
    <!-- Step 5: ask for permissions -->
 | 
			
		||||
 | 
			
		||||
    <div class="dap-bordered js-userid-container">
 | 
			
		||||
      <p class="org-title">Safelogin.org</p>
 | 
			
		||||
      <p class="dap-centered-text dap-normal-text welcome-text center-it">Welcome to a new way to login. Safelogin.org helps you create an Internet ID that allows you to choose what info is shared about you when you login into a site or app online.</p>
 | 
			
		||||
      <p class="org-title">daplie.me</p>
 | 
			
		||||
      <p class="dap-centered-text dap-normal-text welcome-text center-it">Welcome to a new way to login. daplie.me helps you create an Internet ID that allows you to choose what info is shared about you when you login into a site or app online.</p>
 | 
			
		||||
      <form method="post" action="">
 | 
			
		||||
        <div class="form-group">
 | 
			
		||||
          <input type="email" class="form-control dap-input js-oauth3-email emailInput" placeholder="Enter an email address to start"></input>
 | 
			
		||||
@ -45,7 +45,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="dap-bordered js-authn">
 | 
			
		||||
      <p class="org-title">Safelogin.org</p>
 | 
			
		||||
      <p class="org-title">daplie.me</p>
 | 
			
		||||
      <!-- <div class="dap-normal-text">
 | 
			
		||||
        <span class="fa fa-3x icon-centered-3x fa-purple fa-envelope"></span>
 | 
			
		||||
      </div>
 | 
			
		||||
@ -61,6 +61,7 @@
 | 
			
		||||
          <p class="code-lasts-text">Code lasts for 15 minutes.</p>
 | 
			
		||||
          <input type="hidden" class="js-authn-otp-uuid">
 | 
			
		||||
          <input class="dap-input js-authn-otp-code form-control" placeholder="XXXX-XXXX-XXXX" maxlength="14"></input>
 | 
			
		||||
          <p class="error-msg"></p>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="dap-centered-div dap-space-on-top form-group">
 | 
			
		||||
          <label class="js-remember-label dap-normal-text">
 | 
			
		||||
@ -71,7 +72,7 @@
 | 
			
		||||
          </label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- <button class="dap-full-button-green js-remember-btn js-authz-remember-me">SIGN IN ONCE</button> -->
 | 
			
		||||
        <button type="submit" class="btn btn-primary submit-btn dap-full-button-green js-remember-btn js-authz-remember-me">Submit</button>
 | 
			
		||||
        <button type="submit" class="btn btn-primary submit-btn dap-full-button-green js-remember-btn js-authz-remember-me" disabled>Submit</button>
 | 
			
		||||
        <!-- <a href="./authnocode.html" target="_blank" class="btn btn-primary">Send Code Again</a> -->
 | 
			
		||||
        <button class="btn btn-primary js-edit-email-button" type="button">Edit My Email</button>
 | 
			
		||||
      </form>
 | 
			
		||||
@ -85,14 +86,14 @@
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="dap-bordered dap-normal-text js-authz">
 | 
			
		||||
      <p class="org-title">Safelogin.org</p>
 | 
			
		||||
      <p class="org-title">daplie.me</p>
 | 
			
		||||
      <!-- <br> -->
 | 
			
		||||
      <!-- <div class="dap-user-plus-app">
 | 
			
		||||
        <span class="fa fa-3x fa-purple fa-user-circle"></span>
 | 
			
		||||
        <span class="fa fa-2x fa-gray fa-plus"></span>
 | 
			
		||||
        <img class="dap-lab-logo" src="./img/Daplie-Badge-Purple.png" alt="Daplie Labs Logo">
 | 
			
		||||
      </div> -->
 | 
			
		||||
      <p class="dap-centered-text dap-normal-text almost-done-text">Almost done. Now it’s time to set your preferences.</p>
 | 
			
		||||
      <p class="dap-centered-text dap-normal-text almost-done-text">Almost done. Now it's time to set your preferences.</p>
 | 
			
		||||
      <br>
 | 
			
		||||
 | 
			
		||||
      <form class="js-authorization-decision" action="#">
 | 
			
		||||
@ -151,5 +152,5 @@
 | 
			
		||||
    <script src="/assets/oauth3.org/oauth3.issuer.js"></script>
 | 
			
		||||
    <!--script src="/assets/oauth3.org/oauth3.mock.js"></script-->
 | 
			
		||||
 | 
			
		||||
    </body>
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								js/issuer.js
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								js/issuer.js
									
									
									
									
									
								
							@ -106,6 +106,7 @@ $(function () {
 | 
			
		||||
    var callbackUrl;
 | 
			
		||||
    // TODO put in directives.json or similar
 | 
			
		||||
    var grantDescriptions = {
 | 
			
		||||
      // deprecated
 | 
			
		||||
      'oauth3_authn': "Basic secure authentication"
 | 
			
		||||
    , 'auth@oauth3.org': "Basic secure authentication"
 | 
			
		||||
    , 'wallet': "Access to payments and subscriptions"
 | 
			
		||||
@ -116,8 +117,19 @@ $(function () {
 | 
			
		||||
    , 'domains:glue': "Glue Record management (for vanity nameservers)"
 | 
			
		||||
    , 'domains:ns': "Name Server management"
 | 
			
		||||
    , 'dns': "DNS records (A/AAAA, TXT, SRV, MX, etc)"
 | 
			
		||||
 | 
			
		||||
      // new
 | 
			
		||||
    , 'hello@example.com': "Hello World Example Access"
 | 
			
		||||
    , 'authn@oauth3.org': "Basic secure authentication"
 | 
			
		||||
    , 'wallet@oauth3.org': "Access to payments and subscriptions"
 | 
			
		||||
    , 'bucket@oauth3.org': "Access to file storage"
 | 
			
		||||
    , 'db@oauth3.org': "Access to app data"
 | 
			
		||||
    , 'domains@oauth3.org': "Domain registration (and Glue and NS records)" // TODO make an alias
 | 
			
		||||
    , 'domains:glue@oauth3.org': "Glue Record management (for vanity nameservers)"
 | 
			
		||||
    , 'domains:ns@oauth3.org': "Name Server management"
 | 
			
		||||
    , 'dns@oauth3.org': "DNS records (A/AAAA, TXT, SRV, MX, etc)"
 | 
			
		||||
    , 'www@daplie.com': "Websites and webapps"
 | 
			
		||||
 | 
			
		||||
    , '*': "FULL ACCOUNT ACCESS"
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
@ -315,6 +327,8 @@ $(function () {
 | 
			
		||||
      return getAccount(session).then(function () {
 | 
			
		||||
        return getGrants(session);
 | 
			
		||||
      });
 | 
			
		||||
    }, function (error) {
 | 
			
		||||
      $('.error-msg').text('Incorrect code');
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										50
									
								
								js/script.js
									
									
									
									
									
								
							
							
						
						
									
										50
									
								
								js/script.js
									
									
									
									
									
								
							@ -69,28 +69,34 @@ $('body').on('click', '.js-auth-li-enabled', function (ev) {
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
// $('body').on('keyup keypress', '.js-authn-otp-code', function (e) {
 | 
			
		||||
//   'use strict';
 | 
			
		||||
//   var keyCode = e.keyCode || e.which;
 | 
			
		||||
//   var regex = new RegExp('^[0-9 \-]+$');
 | 
			
		||||
//   var key = String.fromCharCode(!e.charCode ? e.which : e.charCode);
 | 
			
		||||
//   var oauthCode = $(this).val().split('-').join('').replace(/\s/g, '');
 | 
			
		||||
//
 | 
			
		||||
//   if (!regex.test(key)) {
 | 
			
		||||
//      event.preventDefault();
 | 
			
		||||
//      return false;
 | 
			
		||||
//   }
 | 
			
		||||
//
 | 
			
		||||
//   if (oauthCode.length > 0) {
 | 
			
		||||
//     oauthCode = oauthCode.match(new RegExp('.{1,4}', 'g')).join("-");
 | 
			
		||||
//   }
 | 
			
		||||
//
 | 
			
		||||
//   $(this).val(oauthCode);
 | 
			
		||||
//
 | 
			
		||||
//   if($(this).val().length === $(this).attr("maxlength")){
 | 
			
		||||
//     $('.submit-btn').prop("disabled", false);
 | 
			
		||||
//   }
 | 
			
		||||
// });
 | 
			
		||||
$('body').on('keyup keypress', '.js-authn-otp-code', function (e) {
 | 
			
		||||
  'use strict';
 | 
			
		||||
  // var keyCode = e.keyCode || e.which;
 | 
			
		||||
  // var regex = new RegExp('^[0-9 \-]+$');
 | 
			
		||||
  // var key = String.fromCharCode(!e.charCode ? e.which : e.charCode);
 | 
			
		||||
  // var oauthCode = $(this).val().split('-').join('').replace(/\s/g, '');
 | 
			
		||||
  //
 | 
			
		||||
  // if (!regex.test(key)) {
 | 
			
		||||
  //    event.preventDefault();
 | 
			
		||||
  //    return false;
 | 
			
		||||
  // }
 | 
			
		||||
  //
 | 
			
		||||
  // if (oauthCode.length > 0) {
 | 
			
		||||
  //   oauthCode = oauthCode.match(new RegExp('.{1,4}', 'g')).join("-");
 | 
			
		||||
  // }
 | 
			
		||||
  //
 | 
			
		||||
  // $(this).val(oauthCode);
 | 
			
		||||
  //
 | 
			
		||||
  // if($(this).val().length === $(this).attr("maxlength")){
 | 
			
		||||
  //   $('.submit-btn').prop("disabled", false);
 | 
			
		||||
  // }
 | 
			
		||||
  if ($(this).val().length === 14) {
 | 
			
		||||
    $('.submit-btn').prop('disabled', false);
 | 
			
		||||
  } else {
 | 
			
		||||
    $('.error-msg').empty();
 | 
			
		||||
    $('.submit-btn').prop('disabled', true);
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
$('.js-authn-otp-code').mask('####-####-####');
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user