I need to extend WCF built-in authentication, so my new one should work alongside built-in ones.
For example, I want to allow access from a registered IP (user auth) or with a username + password (built-in auth).
I have successfully implemented ServiceAuthenticationManager
and ServiceAuthorizationManager
.
ServiceAuthenticationManager.Authenticate
simply adds an IPrincipal
implementation to the message properties, ServiceAuthorizationManager.CheckAccessCore
copies the IPrincipal
from incoming message properties to AuthorizationContext
properties.
However, ServiceAuthenticationManager.Authenticate
completely broken into standard mechanisms, even if I return authPolicy
or the result of calling base.Authenticate
.
Maybe I went the wrong way? What is the correct way to add custom WCF authentication without affecting existing ones? How do I opt out of integrated authentication if a user failure completes?
source share