예제 #1
0
 public VartotojaiController(IAuthenticationProvider authenticationProvider, ISessionFactory sessionFactory, [LoggedIn] UserInformation loggedInUser, HashAlgorithm hashAlgorithm)
 {
     _authenticationProvider = authenticationProvider;
     _sessionFactory = sessionFactory;
     _loggedInUser = loggedInUser;
     _hashAlgorithm = hashAlgorithm;
 }
예제 #2
0
        public virtual void SetUser(IIdentity identity, User user)
        {
            var userInformation = new UserInformation
                                      {
                                          Id = user.Id,
                                          Name = (user.Vardas + " " + user.Pavarde).Trim(),
                                          Role = user.Role
                                      };

            var principal = new OsfiPrincipal(identity, userInformation);
            HttpContext.Current.User = principal;
        }
예제 #3
0
 public HomeController([LoggedIn] UserInformation loggedInUser)
 {
     _loggedInUser = loggedInUser;
 }
예제 #4
0
 public OsfiPrincipal(IIdentity identity, UserInformation user)
 {
     _identity = identity;
     _user = user;
 }
 public ImoniuAdministravimasController(IImoniuService imoniuService, ISessionFactory sessionFactory, [LoggedIn] UserInformation loggedInUser)
 {
     _imoniuService = imoniuService;
     _sessionFactory = sessionFactory;
     _loggedInUser = loggedInUser;
 }