FileDocCategorySizeDatePackage
AuthProvider.javaAPI DocAndroid 1.5 API4646Wed May 06 22:41:04 BST 2009java.security

AuthProvider

public abstract class AuthProvider extends Provider
{@code AuthProvider} is an abstract superclass for Java Security {@code Provider} which provide login and logout.
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
Constructors Summary
protected AuthProvider(String name, double version, String info)
Constructs a new instance of {@code AuthProvider} with its name, version and description.

param
name the name of the provider.
param
version the version of the provider.
param
info a description of the provider.
since
Android 1.0


                                                                                
           
        super(name, version, info); 
    
Methods Summary
public abstract voidlogin(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler)
Performs a login into this {@code AuthProvider}. The specified {@code CallbackHandler} is used to obtain information from the caller.

If a {@code SecurityManager} is installed, code calling this method needs the {@code SecurityPermission} {@code authProvider.NAME} (where NAME is the provider name) to be granted, otherwise a {@code SecurityException} will be thrown.

param
subject the subject that is used to login.
param
handler the handler to obtain authentication information from the caller.
throws
LoginException if the login fails.
throws
SecurityException if a {@code SecurityManager} is installed and the caller does not have permission to invoke this method.
since
Android 1.0

public abstract voidlogout()
Performs a logout from this {@code AuthProvider}.

If a {@code SecurityManager} is installed, code calling this method needs the {@code SecurityPermission} {@code authProvider.NAME} (where NAME is the provider name) to be granted, otherwise a {@code SecurityException} will be thrown.

throws
LoginException if the logout fails.
throws
SecurityException if a {@code SecurityManager} is installed and the caller does not have permission to invoke this method.
since
Android 1.0

public abstract voidsetCallbackHandler(javax.security.auth.callback.CallbackHandler handler)
Sets the {@code CallbackHandler} to this {@code AuthProvider}. If no handler is passed to the {@link #login(Subject, CallbackHandler)} method, this {@code AuthProvider} is using the specified {@code CallbackHandler}.

If no handler is set, this {@code AuthProvider} uses the {@code CallbackHandler} specified by the {@code auth.login.defaultCallbackHandler} security property.

If a {@code SecurityManager} is installed, code calling this method needs the {@code SecurityPermission} {@code authProvider.NAME} (where NAME is the provider name) to be granted, otherwise a {@code SecurityException} will be thrown.

param
handler the handler to obtain authentication information from the caller.
throws
SecurityException if a {@code SecurityManager} is installed and the caller does not have permission to invoke this method.
since
Android 1.0