Package org.onebusaway.users.model

Examples of org.onebusaway.users.model.IndexedUserDetails


  }

  @Override
  public void setCurrentUser(UserIndex userIndex) {

    IndexedUserDetails userDetails = new IndexedUserDetailsImpl(
        _authoritiesService, userIndex);

    DefaultUserAuthenticationToken token = new DefaultUserAuthenticationToken(
        userDetails);
    SecurityContextHolder.getContext().setAuthentication(token);
View Full Code Here


        _indexedUserDetailsService.resetUserForIndexKey(key);

      // Ensure that we have authentication, even if it's anonymous
      if (!isCurrentUserLoggedInWithKey(key)) {
       
        IndexedUserDetails userDetails = _indexedUserDetailsService.getOrCreateUserForIndexKey(
            key, "", false);

        DefaultUserAuthenticationToken token = new DefaultUserAuthenticationToken(
            userDetails);
        SecurityContextHolder.getContext().setAuthentication(token);
View Full Code Here

    Object principal = authentication.getPrincipal();

    if (!(principal instanceof IndexedUserDetails))
      return false;

    IndexedUserDetails details = (IndexedUserDetails) principal;
    UserIndexKey indexKey = details.getUserIndexKey();
    return indexKey.equals(key);
  }
View Full Code Here

  }

  @Override
  public String execute() {
    try {
      IndexedUserDetails details = _currentUserService.getCurrentUserDetails();
      String id = null;
      if (details == null) {
        id = UUID.randomUUID().toString();
      } else {
        UserIndexKey key = details.getUserIndexKey();
        id = key.getType() + "|" + key.getValue();
      }
      _currentUserService.getCurrentUser(true);
      _currentUserService.handleAddAccount("tccStudyId", id, _id, false);
    } catch (Exception ex) {
View Full Code Here

TOP

Related Classes of org.onebusaway.users.model.IndexedUserDetails

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.