Beispiel #1
0
 public override Task ValidateClientAuthentication(
     ValidateClientAuthenticationContext context)
 {
     // Since there's only one application and since it's a public client
     // (i.e a client that cannot keep its credentials private), call Skipped()
     // to inform the server the request should be accepted without
     // enforcing client authentication.
     context.Skipped();
     return(Task.FromResult(0));
 }
Beispiel #2
0
        public override Task ValidateClientAuthentication(ValidateClientAuthenticationContext context)
        {
            if (context.ClientId == "AspNetContribSample")
            {
                // Note: the context is marked as skipped instead of validated because the client
                // is not trusted (JavaScript applications cannot keep their credentials secret).
                context.Skipped();
            }

            else
            {
                // If the client_id doesn't correspond to the
                // intended identifier, reject the request.
                context.Rejected();
            }

            return(Task.FromResult(0));
        }
 public override Task ValidateClientAuthentication(
     ValidateClientAuthenticationContext context)
 {
     context.Skipped();
     return(Task.FromResult <object>(null));
 }