diff --git a/plugins/identity-shiro/src/main/java/org/opensearch/identity/shiro/ShiroSubject.java b/plugins/identity-shiro/src/main/java/org/opensearch/identity/shiro/ShiroSubject.java index e55204593621c..cc8b6c68079fb 100644 --- a/plugins/identity-shiro/src/main/java/org/opensearch/identity/shiro/ShiroSubject.java +++ b/plugins/identity-shiro/src/main/java/org/opensearch/identity/shiro/ShiroSubject.java @@ -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); - } } diff --git a/server/src/main/java/org/opensearch/identity/Subject.java b/server/src/main/java/org/opensearch/identity/Subject.java index cbfdadb5cf6a7..35e40e69e4fe0 100644 --- a/server/src/main/java/org/opensearch/identity/Subject.java +++ b/server/src/main/java/org/opensearch/identity/Subject.java @@ -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); } diff --git a/server/src/main/java/org/opensearch/identity/noop/NoopSubject.java b/server/src/main/java/org/opensearch/identity/noop/NoopSubject.java index 964a218db3cf5..36bc2965eb50a 100644 --- a/server/src/main/java/org/opensearch/identity/noop/NoopSubject.java +++ b/server/src/main/java/org/opensearch/identity/noop/NoopSubject.java @@ -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 - } }