Browse Source

rename js/mock.js -> js/issuer.js

v1
AJ ONeal 7 years ago
parent
commit
61d15b7fb1
  1. 2
      index.html
  2. 5
      js/issuer.js

2
index.html

@ -120,7 +120,7 @@
<!--[if IE]><script src="bower_components/rsvp.js/rsvp.js"></script><![endif]-->
<script src="/assets/com.jquery/jquery-3.1.1.js"></script>
<script src="./js/mock.js"></script>
<script src="./js/issuer.js"></script>
<script src="./js/script.js"></script>
<script src="/assets/org.oauth3/oauth3.core.js"></script>
<script src="/assets/org.oauth3/oauth3.issuer.js"></script>

5
js/mock.js → js/issuer.js

@ -384,7 +384,10 @@ $(function () {
}
// Session initialization
return $.ajax({ url: '.well-known/oauth3/directives.json' }).then(function (directives) {
return OAUTH3.discover(
OAUTH3.clientUri(window.location)
, { client_uri: OAUTH3.clientUri(window.location) }
).then(function (directives) {
// TODO cache directives in memory (and storage)
CONFIG.directives = directives;
directives.issuer = directives.issuer || (window.location.host + window.location.pathname).replace(/\/$/, '');
Loading…
Cancel
Save