Class CurrentUserServiceImpl

java.lang.Object
edu.ucsb.cs156.organic.services.CurrentUserService
edu.ucsb.cs156.organic.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
    • getUser

      public User getUser()
      Get the currently logged in user, or null if no user is logged in.
      Specified by:
      getUser in class CurrentUserService
    • getOAuth2AuthenticatedUser

      public User getOAuth2AuthenticatedUser(org.springframework.security.core.context.SecurityContext securityContext, org.springframework.security.core.Authentication authentication)
      Get the currently logged in user, or null if no user is logged in.
      Parameters:
      securityContext -
      authentication -
      Returns:
    • getRoles

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

      public void updateToken(User user)
    • updateUserFromGithubAPI

      public void updateUserFromGithubAPI(User user)