public override async Task ValidateClientAuthentication(OAuthValidateClientAuthenticationContext context) { string clientId = string.Empty; string clientSecret = string.Empty; string symmetricKeyAsBase64 = string.Empty; if (!context.TryGetBasicCredentials(out clientId, out clientSecret)) { context.TryGetFormCredentials(out clientId, out clientSecret); } if (context.ClientId == null) { context.SetError("invalid_clientId", "client_Id is not set"); return; } var client = await clientService.Find(context.ClientId); if (client == null) { context.SetError("invalid_clientId"); return; } if (!await MyValidateClientRedirectUri(client, context)) { return; } ; context.OwinContext.Set <string>("as:aud", "any"); context.Validated(); return; }
public async Task Test_Find() { var output = await _service.Find("0ac30169-ec86-4cde-bbe4-cd3fd3680dd6"); }