public async Task ReturnProtocolInformation() { //when var protocol = await ManifestInfo.GetProtocol(); //then Assert.AreEqual("unit-test", protocol); }
private async static Task <ManifestInfo> GetInstance() { if (instance == null) { instance = new ManifestInfo(); await instance.init(); } return(instance); }
private static ManifestInfo GetInstance() { if (instance == null) { lock (syncRoot) { instance = new ManifestInfo(); instance.document = instance.GetDocument(); } } return instance; }
private static ManifestInfo GetInstance() { if (instance == null) { lock (syncRoot) { instance = new ManifestInfo(); instance.document = instance.GetDocument(); } } return(instance); }
public static GoogleConfig Create(string clientId, IList <string> scopes, string accountId) { var protocol = ManifestInfo.GetProtocol(); return(new GoogleConfig() { baseURL = "https://accounts.google.com/", authzEndpoint = "o/oauth2/auth", redirectURL = protocol + ":/oauth2Callback", accessTokenEndpoint = "o/oauth2/token", refreshTokenEndpoint = "o/oauth2/token", revokeTokenEndpoint = "rest/revoke", clientId = clientId, scopes = scopes, accountId = accountId }); }
public static KeycloakConfig Create(string clientId, string host, string realm) { var protocol = ManifestInfo.GetProtocol(); var defaulRealmName = clientId + "-realm"; var realmName = realm != null ? realm : defaulRealmName; return(new KeycloakConfig() { baseURL = host + "/auth/", authzEndpoint = string.Format("realms/{0}/tokens/login", realmName), redirectURL = protocol + ":/oauth2Callback", accessTokenEndpoint = string.Format("realms/{0}/tokens/access/codes", realmName), clientId = clientId, refreshTokenEndpoint = string.Format("realms/{0}/tokens/refresh", realmName), revokeTokenEndpoint = string.Format("realms/%@/tokens/logout", realmName), accountId = clientId }); }