using EPAServeur.BDAccess; using Microsoft.AspNetCore.Http; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace EPAServeur.Commun { public class KeycloakAuthentificator { private static readonly string host = "http://www.epa.apside.com/auth/realms/master/protocol/openid-connect/userinfo"; public static bool IsvalidToken(string token) { List> param = new List>(); param.Add(new KeyValuePair("access_token", token)); if (APIAccess.requestPostAPI>(host, param) == null) { return false; } else { return true; } } } }