public static async Task <OidcDataManager> CreateCachedContext(IKeycloakParameters options, bool preload = true) { var newContext = new OidcDataManager(options); OidcManagerCache[options.AuthenticationType + CachedContextPostfix] = newContext; if (preload) { await newContext.ValidateCachedContextAsync(); } return(newContext); }
private static async Task <OidcDataManager> CreateCachedContext(IOwinContext context, IKeycloakParameters options, bool preload = true) { var newContext = new OidcDataManager(context, options); var realmPrefix = GetRealmPrefix(context); OidcManagerCache[realmPrefix + options.AuthenticationType + CachedContextPostfix] = newContext; if (preload) { await newContext.ValidateCachedContextAsync(); } return(newContext); }
public static async Task<OidcDataManager> CreateCachedContext(IKeycloakParameters options, bool preload = true) { var newContext = new OidcDataManager(options); OidcManagerCache[options.AuthenticationType + CachedContextPostfix] = newContext; if (preload) await newContext.ValidateCachedContextAsync(); return newContext; }