Make granttype configurable
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
parent
f71d96be6e
commit
1a0e0b13e7
@ -37,7 +37,10 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
let router = injector.get(Router);
|
let router = injector.get(Router);
|
||||||
if (!oauthService.hasValidAccessToken()) {
|
if (!oauthService.hasValidAccessToken()) {
|
||||||
oauthService.initImplicitFlow(urlPath);
|
if(appConfig.getConfig("grantType") == "code")
|
||||||
|
oauthService.initCodeFlow(urlPath);
|
||||||
|
else
|
||||||
|
oauthService.initImplicitFlow(urlPath);
|
||||||
} else {
|
} else {
|
||||||
router.navigateByUrl(urlPath);
|
router.navigateByUrl(urlPath);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"clientId": "farmmaps",
|
"clientId": "farmmaps",
|
||||||
"audience": "http://farmmaps.awtest.nl/",
|
"audience": "http://farmmaps.awtest.nl/",
|
||||||
"requireHttps": false,
|
"requireHttps": false,
|
||||||
"apiEndPoint": "http://farmmaps.awtest.nl"
|
"apiEndPoint": "http://farmmaps.awtest.nl",
|
||||||
|
"grantType":"implicit"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user