Package edu.ucsb.cs156.organic.services
Class CurrentUserServiceImpl
java.lang.Object
edu.ucsb.cs156.organic.services.CurrentUserService
edu.ucsb.cs156.organic.services.CurrentUserServiceImpl
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongetOAuth2AuthenticatedUser(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.Collection<? extends org.springframework.security.core.GrantedAuthority>getRoles()getUser()Get the currently logged in user, or null if no user is logged in.voidupdateToken(User user) voidupdateUserFromGithubAPI(User user)  
- 
Constructor Details
- 
CurrentUserServiceImpl
public CurrentUserServiceImpl() 
 - 
 - 
Method Details
- 
getCurrentUser
- Specified by:
 getCurrentUserin classCurrentUserService
 - 
getUser
Get the currently logged in user, or null if no user is logged in.- Specified by:
 getUserin classCurrentUserService
 - 
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
- Specified by:
 getRolesin classCurrentUserService
 - 
updateToken
 - 
updateUserFromGithubAPI
 
 -