Skip to content

Commit

Permalink
Remove subject authenticate method as well
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Crawford <[email protected]>
  • Loading branch information
stephen-crawford committed Oct 13, 2023
1 parent 5132a52 commit bba635e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,4 @@ public int hashCode() {
public String toString() {
return "ShiroSubject(principal=" + getPrincipal() + ")";
}

/**
* Logs the user in via authenticating the user against current Shiro realm
* @param authenticationToken The authToken to be used for login
*/
public void authenticate(AuthToken authenticationToken) {
final org.apache.shiro.authc.AuthenticationToken authToken = authTokenHandler.translateAuthToken(authenticationToken)
.orElseThrow(() -> new UnsupportedAuthenticationToken());
shiroSubject.login(authToken);
}
}
9 changes: 0 additions & 9 deletions server/src/main/java/org/opensearch/identity/Subject.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,4 @@ public interface Subject {
* Get the application-wide uniquely identifying principal
* */
Principal getPrincipal();

/**
* Authenticate via an auth token
* throws UnsupportedAuthenticationMethod
* throws InvalidAuthenticationToken
* throws SubjectNotFound
* throws SubjectDisabled
*/
void authenticate(final AuthToken token);
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,4 @@ public int hashCode() {
public String toString() {
return "NoopSubject(principal=" + getPrincipal() + ")";
}

/**
* Logs the user in
*/
@Override
public void authenticate(AuthToken AuthToken) {
// Do nothing as noop subject is always logged in
}
}

0 comments on commit bba635e

Please sign in to comment.