com.squeakysand.commons.jaas.SecurityProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of squeakysand-commons Show documentation
Show all versions of squeakysand-commons Show documentation
Classes, interfaces and enums that assist with everyday Java development tasks.
The newest version!
/*
* Copyright 2010-2012 Craig S. Dickson (http://craigsdickson.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.squeakysand.commons.jaas;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.Set;
import javax.security.auth.Subject;
/**
* Interface to abstract out any differences in implementations of the JAAS standard that are
* currently present in certain application servers.
*/
public interface SecurityProvider {
/**
* doAs.
*
* @see javax.security.auth.Subject#doAs(javax.security.auth.Subject,
* java.security.PrivilegedAction)
* @param callerId a {@link javax.security.auth.Subject} object.
* @param action a {@link java.security.PrivilegedAction} object.
* @return a {@link java.lang.Object} object.
*/
Object doAs(Subject callerId, PrivilegedAction> action);
/**
* doAs.
*
* @see javax.security.auth.Subject#doAs(javax.security.auth.Subject,
* java.security.PrivilegedExceptionAction)
* @param callerId a {@link javax.security.auth.Subject} object.
* @param action a {@link java.security.PrivilegedExceptionAction} object.
* @return a {@link java.lang.Object} object.
* @throws java.security.PrivilegedActionException if any.
*/
Object doAs(Subject callerId, PrivilegedExceptionAction> action) throws PrivilegedActionException;
/**
* getPrincipals.
*
* @see javax.security.auth.Subject#getPrincipals(java.lang.Class)
* @param c a {@link java.lang.Class} object.
* @return a {@link java.util.Set} object.
*/
Set> getPrincipals(Class> c);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy