Skip to content

Commit

Permalink
Renamed getAndValidateUserFromShortSessionValue to validateToken,
Browse files Browse the repository at this point in the history
deleted getAndValidateCurrentUser from session service
  • Loading branch information
alexbalakirev committed Oct 27, 2024
1 parent 06a0157 commit 5a897c4
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/main/java/com/corbado/services/SessionService.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void setIssuerMismatchError(final String issuer) {
* @throws JwkException the jwk exception
* @throws IncorrectClaimException the incorrect claim exception
*/
private SessionValidationResult getAndValidateUserFromShortSessionValue(final String sessionToken)
public SessionValidationResult validateToken(final String sessionToken)
throws JWTVerificationException, JwkException, IncorrectClaimException {

if (sessionToken == null || sessionToken.isEmpty()) {
Expand Down Expand Up @@ -163,19 +163,4 @@ private SessionValidationResult getAndValidateUserFromShortSessionValue(final St
throw e;
}
}

/**
* Retrieves userID and full name if 'sessionToken' is valid.
*
* @param sessionToken the short session
* @return the and validate current user
* @throws IncorrectClaimException the incorrect claim exception
* @throws JWTVerificationException the JWT verification exception
* @throws JwkException the jwk exception
*/
public SessionValidationResult getAndValidateCurrentUser(final String sessionToken)
throws IncorrectClaimException, JWTVerificationException, JwkException {

return getAndValidateUserFromShortSessionValue(sessionToken);
}
}

0 comments on commit 5a897c4

Please sign in to comment.