Package org.onebusaway.users.model

Examples of org.onebusaway.users.model.IndexedUserDetails


public class IndexedUserDetailsSaltSourceImpl implements SaltSource {

  @Override
  public Object getSalt(UserDetails user) {
    if (user instanceof IndexedUserDetails) {
      IndexedUserDetails details = (IndexedUserDetails) user;
      return details.getUserIndexKey().getValue();
    }
    return user.getUsername();
  }
View Full Code Here


    if (result.getCode() != EResultCode.SUCCESS)
      throw new EveryLastLoginAuthenticationException(
          "AuthenticationResult failure", mode);

    IndexedUserDetails details = _currentUserService.handleUserAction(
        result.getProvider(), result.getIdentity(), result.getCredentials(),
        false, mode);

    if (details == null)
      throw new EveryLastLoginAuthenticationException("could not get user details", mode);
View Full Code Here

  }

  @Override
  public Map<String, Object> isInteractionLoggedForCurrentUser() {

    IndexedUserDetails details = _currentUserService.getCurrentUserDetails();

    if (details == null)
      return null;

    for (UserInteractionLoggingIndicator indicator : _indicators) {
View Full Code Here

  @Override
  public IndexedUserDetails getCurrentUserDetails(
      boolean createUserIfAppropriate) {

    IndexedUserDetails details = super.getCurrentUserDetails(createUserIfAppropriate);

    if (details == null && createUserIfAppropriate) {
     
      Authentication authentication = createAuthentication();
      details = getUserDetailsForAuthentication(authentication);
View Full Code Here

    UUID uuid = UUID.randomUUID();
    UUID credentials = UUID.randomUUID();

    UserIndexKey principal = new UserIndexKey(UserIndexTypes.WEB,
        uuid.toString());
    IndexedUserDetails details = _userDetailsService.getOrCreateUserForIndexKey(
        principal, credentials.toString(), true);

    return new DefaultUserAuthenticationToken(details);
  }
View Full Code Here

   * {@link CurrentUserService} Interface
   ****/

  @Override
  public boolean isCurrentUserAnonymous() {
    IndexedUserDetails details = _currentUserStrategy.getCurrentUserDetails(false);
    if (details == null)
      return true;
    return details.isAnonymous();
  }
View Full Code Here

    return details.isAnonymous();
  }

  @Override
  public boolean isCurrentUserAdmin() {
    IndexedUserDetails details = _currentUserStrategy.getCurrentUserDetails(false);
    if (details == null)
      return false;
    return details.isAdmin();
  }
View Full Code Here

    return _userService.registerPhoneNumber(user, phoneNumber);
  }

  @Override
  public boolean hasPhoneNumberRegistration() {
    IndexedUserDetails details = _currentUserStrategy.getCurrentUserDetails(false);
    if (details == null)
      return false;
    return _userService.hasPhoneNumberRegistration(details.getUserIndexKey());
  }
View Full Code Here

    return true;
  }

  @Override
  public void clearPhoneNumberRegistration() {
    IndexedUserDetails details = _currentUserStrategy.getCurrentUserDetails(false);
    if (details == null)
      return;
    _userService.clearPhoneNumberRegistration(details.getUserIndexKey());
  }
View Full Code Here

    return userIndex.getUser();
  }

  public UserIndex getCurrentUserIndex(boolean createUserIfAppropriate) {

    IndexedUserDetails details = getCurrentUserDetails(createUserIfAppropriate);

    if (details == null)
      return null;

    return _userService.getUserIndexForId(details.getUserIndexKey());
  }
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.