TF-624 Set clientId for oidc on browser
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
|
import 'package:core/core.dart';
|
||||||
|
|
||||||
class OIDCConstant {
|
class OIDCConstant {
|
||||||
static String get mobileOidcClientId => 'teammail-mobile';
|
static String get mobileOidcClientId => 'teammail-mobile';
|
||||||
|
static String get webOidcClientId => 'teammail-web';
|
||||||
static List<String> get oidcScope => ['openid', 'offline_access'];
|
static List<String> get oidcScope => ['openid', 'offline_access'];
|
||||||
static const keyAuthorityOidc = 'KEY_AUTHORITY_OIDC';
|
static const keyAuthorityOidc = 'KEY_AUTHORITY_OIDC';
|
||||||
|
|
||||||
|
static String get clientId => BuildUtils.isWeb ? webOidcClientId : mobileOidcClientId;
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,7 @@ class OIDCHttpClient {
|
|||||||
log('OIDCHttpClient::getOIDCConfiguration(): href: ${oidcResponse.links[0].href}');
|
log('OIDCHttpClient::getOIDCConfiguration(): href: ${oidcResponse.links[0].href}');
|
||||||
return OIDCConfiguration(
|
return OIDCConfiguration(
|
||||||
authority: oidcResponse.links[0].href.toString(),
|
authority: oidcResponse.links[0].href.toString(),
|
||||||
clientId: OIDCConstant.mobileOidcClientId,
|
clientId: OIDCConstant.clientId,
|
||||||
scopes: OIDCConstant.oidcScope
|
scopes: OIDCConstant.oidcScope
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user