FileDocCategorySizeDatePackage
AuthPermission.javaAPI DocAndroid 1.5 API4068Wed May 06 22:41:02 BST 2009javax.security.auth

AuthPermission

public final class AuthPermission extends BasicPermission
Governs the use of methods in this package and also its subpackages. A target name of the permission specifies which methods are allowed without specifying the concrete action lists. Possible target names and associated authentication permissions are:
doAs invoke Subject.doAs methods.
doAsPrivileged invoke the Subject.doAsPrivileged methods.
getSubject invoke Subject.getSubject().
getSubjectFromDomainCombiner invoke SubjectDomainCombiner.getSubject().
setReadOnly invoke Subject.setReadonly().
modifyPrincipals modify the set of principals
associated with a Subject.
modifyPublicCredentials modify the set of public credentials
associated with a Subject.
modifyPrivateCredentials modify the set of private credentials
associated with a Subject.
refreshCredential invoke the refresh method on a credential of a
refreshable credential class.
destroyCredential invoke the destroy method on a credential of a
destroyable credential class.
createLoginContext.name instantiate a LoginContext with the
specified name. The wildcard name ('*')
allows to a LoginContext of any name.
getLoginConfiguration invoke the getConfiguration method of
javax.security.auth.login.Configuration.
refreshLoginConfiguration Invoke the refresh method of
javax.security.auth.login.Configuration.
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
private static final String
CREATE_LOGIN_CONTEXT
private static final String
CREATE_LOGIN_CONTEXT_ANY
Constructors Summary
public AuthPermission(String name)
Creates an authentication permission with the specified target name.

param
name the target name of this authentication permission.

        super(init(name));
    
public AuthPermission(String name, String actions)
Creates an authentication permission with the specified target name.

param
name the target name of this authentication permission.
param
actions this parameter is ignored and should be {@code null}.

        super(init(name), actions);
    
Methods Summary
private static java.lang.Stringinit(java.lang.String name)

 //$NON-NLS-1$

    // inits permission name.
         

        if (name == null) {
            throw new NullPointerException(Messages.getString("auth.13")); //$NON-NLS-1$
        }

        if (CREATE_LOGIN_CONTEXT.equals(name)) {
            return CREATE_LOGIN_CONTEXT_ANY;
        }
        return name;