Handle web finger to get token in HomeController
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -158,4 +158,24 @@ abstract class ReloadableController extends BaseController {
|
||||
failure is GetStoredTokenOidcFailure ||
|
||||
failure is GetAuthenticatedAccountFailure;
|
||||
}
|
||||
|
||||
void synchronizeTokenAndGetSession({
|
||||
required Uri baseUri,
|
||||
required TokenOIDC tokenOIDC,
|
||||
required OIDCConfiguration oidcConfiguration,
|
||||
}) {
|
||||
final baseUrl = baseUri.toString();
|
||||
dynamicUrlInterceptors.setJmapUrl(baseUrl);
|
||||
dynamicUrlInterceptors.changeBaseUrl(baseUrl);
|
||||
authorizationInterceptors.setTokenAndAuthorityOidc(
|
||||
newToken: tokenOIDC,
|
||||
newConfig: oidcConfiguration,
|
||||
);
|
||||
authorizationIsolateInterceptors.setTokenAndAuthorityOidc(
|
||||
newToken: tokenOIDC,
|
||||
newConfig: oidcConfiguration,
|
||||
);
|
||||
|
||||
getSessionAction();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user