Class OauthUsersService
java.lang.Object
org.diabetestechnology.drh.service.http.OauthUsersService
@ConfigurationProperties(prefix="org.drh.service.http.github")
@Service
public class OauthUsersService
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final record
static final record
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasAdminMenu
(String userId) Deprecated.boolean
hasAdminMenuDB
(String userId, String provider) isAuthorizedUser
(org.springframework.security.oauth2.core.user.DefaultOAuth2User user) Deprecated.isAuthorizedUserDB
(org.springframework.security.oauth2.core.user.DefaultOAuth2User user)
-
Constructor Details
-
OauthUsersService
-
-
Method Details
-
isAuthorizedUser
@Deprecated public Optional<OauthUsersService.AuthorizedUser> isAuthorizedUser(org.springframework.security.oauth2.core.user.DefaultOAuth2User user) Deprecated.Check GitHub to see if the provided userName is an authorized user. This method will always go back to GitHub and load all users before returning result. User is responsible for caching to reduce performance hits.- Parameters:
gitHubLoginID
- the GitHub userName to check- Returns:
- non-empty AuthenticatedUser if found authorized or empty if not authorized
-
isAuthorizedUserDB
public Optional<OauthUsersService.AuthorizedUser> isAuthorizedUserDB(org.springframework.security.oauth2.core.user.DefaultOAuth2User user) -
hasAdminMenu
Deprecated. -
hasAdminMenuDB
-