Class CurrentUserServiceImpl

java.lang.Object
edu.ucsb.cs156.gauchoride.services.CurrentUserService
edu.ucsb.cs156.gauchoride.services.CurrentUserServiceImpl

@Service("currentUser") public class CurrentUserServiceImpl extends CurrentUserService
  • Constructor Details

    • CurrentUserServiceImpl

      public CurrentUserServiceImpl()
  • Method Details

    • getCurrentUser

      public CurrentUser getCurrentUser()
      Specified by:
      getCurrentUser in class CurrentUserService
    • getOAuth2AuthenticatedUser

      public User getOAuth2AuthenticatedUser(org.springframework.security.core.context.SecurityContext securityContext, org.springframework.security.core.Authentication authentication)
    • getUser

      public User getUser()
      Specified by:
      getUser in class CurrentUserService
    • getRoles

      public Collection<? extends org.springframework.security.core.GrantedAuthority> getRoles()
      Specified by:
      getRoles in class CurrentUserService
    • resetCurrentUser

      public void resetCurrentUser()
      Description copied from class: CurrentUserService
      This should only be called in test code, never in production code! It resets the current user to a known state for tests, in case a previous test has changed it in some way.
      Specified by:
      resetCurrentUser in class CurrentUserService