Make granttype configurable
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma 2020-01-14 16:46:59 +01:00
parent f71d96be6e
commit 1a0e0b13e7
2 changed files with 6 additions and 2 deletions

View File

@ -37,7 +37,10 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS
}).then(() => {
let router = injector.get(Router);
if (!oauthService.hasValidAccessToken()) {
oauthService.initImplicitFlow(urlPath);
if(appConfig.getConfig("grantType") == "code")
oauthService.initCodeFlow(urlPath);
else
oauthService.initImplicitFlow(urlPath);
} else {
router.navigateByUrl(urlPath);
}

View File

@ -3,6 +3,7 @@
"clientId": "farmmaps",
"audience": "http://farmmaps.awtest.nl/",
"requireHttps": false,
"apiEndPoint": "http://farmmaps.awtest.nl"
"apiEndPoint": "http://farmmaps.awtest.nl",
"grantType":"implicit"
}