Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Re-using authentication info #2572


User avatar
0
jamsecgmbh created

Hi,

is it possible to re-use the authentication info of an user in an ASP.NET Zero project that uses LDAP auth (SPA with Angular 1)? I would like to use it to authenticate the user against the Exchange Webservice managed API, if this should be possible (<a class="postlink" href="https://github.com/OfficeDev/ews-managed-api">https://github.com/OfficeDev/ews-managed-api</a>). I think it will not be possible to use the "service.UseDefaultCredentials = true;" with the web application, but perhaps we can use the credentials entered to login? (service.Credentials = new WebCredentials("[email protected]", "password"); Source: <a class="postlink" href="https://msdn.microsoft.com/en-us/library/office/dn567668(v=exchg.150">https://msdn.microsoft.com/en-us/librar ... =exchg.150</a>).aspx)

Thank you very much.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We don't store Ldap user's passwords by default. You can create your own version of LdapAuthenticationSource derived from LdapAuthenticationSource. Then you can override this method <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/blob/09cb578f09ee0318b479aa31dd0ceff56a5d218d/src/Abp.Zero.Ldap/Ldap/Authentication/LdapAuthenticationSource.cs#L104">https://github.com/aspnetboilerplate/mo ... ce.cs#L104</a> and store user's password in an encrypted way in user's table.

    Then you can use that password and user's username.