Package com.lpvs.service
Class LPVSLoginCheckService
java.lang.Object
com.lpvs.service.LPVSLoginCheckService
Service class for handling login-related operations in LPVS.
-
Constructor Summary
ConstructorsConstructorDescriptionLPVSLoginCheckService
(LPVSPullRequestRepository lpvsPullRequestRepository, LPVSMemberRepository memberRepository) Constructor for LPVSLoginCheckService. -
Method Summary
Modifier and TypeMethodDescriptiongetMemberFromMemberMap
(org.springframework.security.core.Authentication authentication) Get an LPVSMember from the OAuth login member map.getOauthLoginMemberMap
(org.springframework.security.core.Authentication authentication) Get OAuth login member map from the authentication object.void
loginVerification
(org.springframework.security.core.Authentication authentication) Perform login verification using the authentication object.pathCheck
(String type, String name, org.springframework.data.domain.Pageable pageable, org.springframework.security.core.Authentication authentication) Check access based on type, name, pageable, and authentication.
-
Constructor Details
-
LPVSLoginCheckService
public LPVSLoginCheckService(LPVSPullRequestRepository lpvsPullRequestRepository, LPVSMemberRepository memberRepository) Constructor for LPVSLoginCheckService.- Parameters:
lpvsPullRequestRepository
- Repository for LPVS pull requests.memberRepository
- Repository for LPVS members.
-
-
Method Details
-
getOauthLoginMemberMap
public Map<String,Object> getOauthLoginMemberMap(org.springframework.security.core.Authentication authentication) Get OAuth login member map from the authentication object.- Parameters:
authentication
- The authentication object.- Returns:
- Map representing the attributes of the OAuth login member.
-
loginVerification
public void loginVerification(org.springframework.security.core.Authentication authentication) Perform login verification using the authentication object.- Parameters:
authentication
- The authentication object.- Throws:
LoginFailedException
- If login verification fails.
-
getMemberFromMemberMap
public LPVSMember getMemberFromMemberMap(org.springframework.security.core.Authentication authentication) Get an LPVSMember from the OAuth login member map.- Parameters:
authentication
- The authentication object.- Returns:
- LPVSMember extracted from the OAuth login member map.
-
pathCheck
public HistoryPageEntity pathCheck(String type, String name, org.springframework.data.domain.Pageable pageable, org.springframework.security.core.Authentication authentication) Check access based on type, name, pageable, and authentication.- Parameters:
type
- The type of access.name
- The name associated with access.pageable
- Pageable object for pagination.authentication
- The authentication object.- Returns:
- HistoryPageEntity representing the results of access verification.
- Throws:
WrongAccessException
- If access verification fails.
-