public AuthController(KeyCloakOAuthAPIConfig keyCloakOptions) { _keyCloakOptions = keyCloakOptions; }
public static AccessTokenResponse GetAccessToken(KeyCloakOAuthAPIConfig keyCloakServerOptions) { string accessTokenJson = new HttpClientCallerService(new DefaultHttpClientCaller()).POST(keyCloakServerOptions.AccessTokenEndpoint, string.Format("grant_type={0}&client_id={1}&client_secret={2}", keyCloakServerOptions.Grant_Type, keyCloakServerOptions.Client_Id, keyCloakServerOptions.Client_Secret), "application/x-www-form-urlencoded"); return(JsonConvert.DeserializeObject <AccessTokenResponse>(accessTokenJson)); }