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

This commit is contained in:
AJ ONeal 2017-05-24 08:34:41 +00:00
parent a0bd7474cc
commit 61d15b7fb1
2 changed files with 5 additions and 2 deletions

View File

@ -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>

View File

@ -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(/\/$/, '');