public abstract class

AuthProvider

extends Provider
java.lang.Object
   ↳ java.util.Dictionary<K, V>
     ↳ java.util.Hashtable<K, V>
       ↳ java.util.Properties
         ↳ java.security.Provider
           ↳ java.security.AuthProvider

Class Overview

AuthProvider is an abstract superclass for Java Security Provider which provide login and logout.

Summary

[Expand]
Inherited Fields
From class java.util.Properties
Protected Constructors
AuthProvider(String name, double version, String info)
Constructs a new instance of AuthProvider with its name, version and description.
Public Methods
abstract void login(Subject subject, CallbackHandler handler)
Performs a login into this AuthProvider.
abstract void logout()
Performs a logout from this AuthProvider.
abstract void setCallbackHandler(CallbackHandler handler)
Sets the CallbackHandler to this AuthProvider.
[Expand]
Inherited Methods
From class java.security.Provider
From class java.util.Properties
From class java.util.Hashtable
From class java.util.Dictionary
From class java.lang.Object
From interface java.util.Map

Protected Constructors

protected AuthProvider (String name, double version, String info)

Since: API Level 1

Constructs a new instance of AuthProvider with its name, version and description.

Parameters
name the name of the provider.
version the version of the provider.
info a description of the provider.

Public Methods

public abstract void login (Subject subject, CallbackHandler handler)

Since: API Level 1

Performs a login into this AuthProvider. The specified CallbackHandler is used to obtain information from the caller.

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

Parameters
subject the subject that is used to login.
handler the handler to obtain authentication information from the caller.
Throws
LoginException if the login fails.
SecurityException if a SecurityManager is installed and the caller does not have permission to invoke this method.

public abstract void logout ()

Since: API Level 1

Performs a logout from this AuthProvider.

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

Throws
LoginException if the logout fails.
SecurityException if a SecurityManager is installed and the caller does not have permission to invoke this method.

public abstract void setCallbackHandler (CallbackHandler handler)

Since: API Level 1

Sets the CallbackHandler to this AuthProvider. If no handler is passed to the login(Subject, CallbackHandler) method, this AuthProvider is using the specified CallbackHandler.

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

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

Parameters
handler the handler to obtain authentication information from the caller.
Throws
SecurityException if a SecurityManager is installed and the caller does not have permission to invoke this method.