Skip to content

Commit

Permalink
update
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 b745159 commit e118b1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1953,18 +1953,6 @@ public TokenManager getTokenManager() {
return tokenManager;
}

/**
* Handles tracking the active subject when requests are made using an auth token
* ~NOT right~
* @param subject
* @param authToken
*/
@Override
public void authenticate(Subject subject, AuthToken authToken) {
this.subject = (SecuritySubject) subject;
this.subject.setThreadContext(threadPool.getThreadContext());
}

public static class GuiceHolder implements LifecycleComponent {

private static RepositoriesService repositoriesService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.opensearch.common.util.concurrent.ThreadContext;
import org.opensearch.identity.NamedPrincipal;
import org.opensearch.identity.Subject;
import org.opensearch.identity.tokens.AuthToken;
import org.opensearch.security.support.ConfigConstants;
import org.opensearch.security.user.User;

Expand All @@ -39,4 +40,9 @@ public Principal getPrincipal() {
}
return new NamedPrincipal(user.getName());
}

@Override
public void authenticate(AuthToken authToken) {
// TODO: How is this supposed to work?
}
}

0 comments on commit e118b1c

Please sign in to comment.