public override string Authenticate(string dn, string user, string password) { log.Debug("Token request from user: "******""; AuthenticateUserReq aur = new AuthenticateUserReq(); aur.ItemElementName = ItemChoiceType42.password; aur.Item = password; aur.userid = user; AuthenticateUserResponse aures = _aas.doAuthenticateUser(aur); if ([email protected]) { if (userCanMonitoring(dn, user)) { token = GenerateToken(dn); } else { throw new AuthenticationMismatchException(); } } else { throw new AuthenticationFailedException(); } return(token); }
public override bool ValidateUser(string username, string password) { try { AuthenticateUserReq aur = new AuthenticateUserReq(); aur.ItemElementName = ItemChoiceType42.password; aur.Item = password; aur.sequenceSpecified = false; aur.userid = username; AuthenticateUserResponse response = _axlService.doAuthenticateUser(aur); return([email protected]); } catch (Exception e) { log.Error("Impossible d'authentifier l'utilisateur: " + e.Message); return(false); } }
/// <summary> /// /// </summary> /// <param name="pName"></param> /// <param name="pPassword"></param> /// <param name="pAuthenticationMode"></param> /// <param name="pDomain"></param> /// <param name="pIsEnvironmentUser"></param> /// <returns></returns> internal static User AuthenticateUser(String pName, String pPassword, AuthenticationModeEnum pAuthenticationMode, String pDomain, Boolean pIsEnvironmentUser) { AuthenticateUserReq req = new AuthenticateUserReq(); req.BusinessData.IsEnvironmentUser = pIsEnvironmentUser; req.BusinessData.UserName = pName; req.BusinessData.Password = pPassword; req.BusinessData.Domain = pDomain; req.BusinessData.AuthenticationMode = pAuthenticationMode; AuthenticateUserRes res = _ClientServiceBase.ExecuteService <AuthenticateUserReq, AuthenticateUserRes>(WrapperSecurityProvider, req); if (res.Error != null) { throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error); } ///TODO: arreglar AuthenticateUserRes return(res.BusinessData.UserInfo); }
public AuthenticateUserRes AuthenticateUser(string pUserName, string pPassword, out string pErrorResult) { string d = System.Reflection.Assembly.GetExecutingAssembly().Location; AuthenticateUserReq req = new AuthenticateUserReq(); req.BusinessData.AuthenticationMode = AuthenticationModeEnum.ASPNETMemberShips; req.BusinessData.UserName = pUserName; req.BusinessData.Password = pPassword; AuthenticateUserRes res = base.ClientServiceBase.ExecuteService <AuthenticateUserReq, AuthenticateUserRes>(req); if (res.Error != null) { pErrorResult = Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error).Message; } else { pErrorResult = String.Empty; } return(res); }
/// <summary> /// /// </summary> /// <param name="pName"></param> /// <param name="pPassword"></param> /// <param name="pAuthenticationMode"></param> /// <param name="pDomain"></param> /// <param name="pIsEnvironmentUser"></param> /// <returns></returns> internal static User AuthenticateUser(String pName, String pPassword, AuthenticationModeEnum pAuthenticationMode, String pDomain, Boolean pIsEnvironmentUser) { AuthenticateUserReq req = new AuthenticateUserReq(); req.BusinessData.IsEnvironmentUser = pIsEnvironmentUser; req.BusinessData.UserName = pName; req.BusinessData.Password = pPassword; req.BusinessData.Domain = pDomain; req.BusinessData.AuthenticationMode = pAuthenticationMode; AuthenticateUserRes res = _ClientServiceBase.ExecuteService<AuthenticateUserReq, AuthenticateUserRes>(WrapperSecurityProvider,req); if (res.Error != null) throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error); ///TODO: arreglar AuthenticateUserRes return res.BusinessData.UserInfo; }
public AuthenticateUserRes AuthenticateUser(string pUserName, string pPassword, out string pErrorResult) { string d = System.Reflection.Assembly.GetExecutingAssembly().Location; AuthenticateUserReq req = new AuthenticateUserReq(); req.BusinessData.AuthenticationMode = AuthenticationModeEnum.ASPNETMemberShips; req.BusinessData.UserName = pUserName; req.BusinessData.Password = pPassword; AuthenticateUserRes res = base.ClientServiceBase.ExecuteService<AuthenticateUserReq, AuthenticateUserRes>(req); if (res.Error != null) pErrorResult = Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error).Message; else pErrorResult = String.Empty; return res; }
public override bool ValidateUser(string username, string password) { try { AuthenticateUserReq aur = new AuthenticateUserReq(); aur.ItemElementName = ItemChoiceType42.password; aur.Item = password; aur.sequenceSpecified = false; aur.userid = username; AuthenticateUserResponse response = _axlService.doAuthenticateUser(aur); return [email protected]; } catch (Exception e) { log.Error("Impossible d'authentifier l'utilisateur: " + e.Message); return false; } }
public override string Authenticate(string dn, string user, string password) { log.Debug("Token request from user: "******""; AuthenticateUserReq aur = new AuthenticateUserReq(); aur.ItemElementName = ItemChoiceType42.password; aur.Item = password; aur.userid = user; AuthenticateUserResponse aures = _aas.doAuthenticateUser(aur); if ([email protected]) { if (userCanMonitoring(dn, user)) { token = GenerateToken(dn); } else { throw new AuthenticationMismatchException(); } } else { throw new AuthenticationFailedException(); } return token; }