servicestack - combine AspNetWindowsAuthProvider and CredentialsAuthProvider -
servicestack - combine AspNetWindowsAuthProvider and CredentialsAuthProvider -
is possible utilize aspnetwindowsauthprovider , fallback credentialsauthprovider if current user not logged in windows domain?
thanks
it works other authproviders can register authentication options wish allow, e.g:
plugins.add(new authfeature( () => new customusersession(), //use own typed custom usersession type new iauthprovider[] { new aspnetwindowsauthprovider(this) { allowallwindowsauthusers = true }, new credentialsauthprovider(), }));
users still need explicitly log in chosen auth option, i.e. login windows auth need access /auth/windowsauth
route whilst login credentials auth need explicitly post username/password, i.e:
<form action="/auth/credentials"> <input type="text" name="username" /> <input type="password" name="password" /> <input type="submit"/> </form>
note: credentialsauthprovider
allows access users registered in auth providers, e.g. users who've registered registrationservice (i.e /register
), it's not linked windowsauth.
servicestack windows-authentication
Comments
Post a Comment