Skip to content

Commit

Permalink
Add runAs api in SecurityDomainContext
Browse files Browse the repository at this point in the history
  • Loading branch information
jimma committed Dec 20, 2016
1 parent e0cd33e commit b2843e5
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -23,6 +23,7 @@

import java.security.Principal;
import java.util.Set;
import java.util.concurrent.Callable;

import javax.security.auth.Subject;

Expand Down Expand Up @@ -87,4 +88,12 @@ public interface SecurityDomainContext
* @param credential credential
*/
public void pushSubjectContext(final Subject subject, final Principal principal, final Object credential);


/**
* Run action under this security context
* @param action the action to run
* @throws Exception if input action fails
*/
public void runAs(Callable<Void> action) throws Exception;
}

0 comments on commit b2843e5

Please sign in to comment.