private static bool IsRequestAuthunticated(SSOUserToken token) { //throw new Exception("UsernameToken not supplied"); int useridx = Array.IndexOf(WebServiceUsers, token.SSOUserName); string pass = ""; if (useridx >= 0) pass = WebServicePasswords[useridx]; if (pass != "" && (pass == token.SSOPassword)) return true; throw new Exception("UsernameToken is not valid"); }
public UserProfile GetUserInfo(SSOUserToken token, String UserID) { if (IsRequestAuthunticated(token)) return UserManager.GetUserInfo(UserID); return null; }
public UserProfile Authenticate(SSOUserToken token, String UserID, String Password) { if (IsRequestAuthunticated(token)) return UserManager.AuthenticateUser(UserID, Password); return null; }