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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -