com.dyuproject.web.auth
Class Authentication

java.lang.Object
  extended by com.dyuproject.web.auth.Authentication
Direct Known Subclasses:
BasicAuthentication, DigestAuthentication

public abstract class Authentication
extends Object

Web authorization

Author:
David Yu

Field Summary
static String AUTHORIZATION
           
static String PASSWORD
           
static String REALM
           
static String USERNAME
           
static String WWW_AUTHENTICATE
           
 
Constructor Summary
Authentication(CredentialSource credentialSource)
           
 
Method Summary
abstract  boolean authenticate(String realm, HttpServletRequest request, HttpServletResponse response)
           
 CredentialSource getCredentialSource()
           
abstract  String getType()
           
 void setCredentialSource(CredentialSource credentialSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTHORIZATION

public static final String AUTHORIZATION
See Also:
Constant Field Values

WWW_AUTHENTICATE

public static final String WWW_AUTHENTICATE
See Also:
Constant Field Values

USERNAME

public static final String USERNAME
See Also:
Constant Field Values

PASSWORD

public static final String PASSWORD
See Also:
Constant Field Values

REALM

public static final String REALM
See Also:
Constant Field Values
Constructor Detail

Authentication

public Authentication(CredentialSource credentialSource)
Method Detail

setCredentialSource

public void setCredentialSource(CredentialSource credentialSource)

getCredentialSource

public CredentialSource getCredentialSource()

authenticate

public abstract boolean authenticate(String realm,
                                     HttpServletRequest request,
                                     HttpServletResponse response)
                              throws ServletException,
                                     IOException
Throws:
ServletException
IOException

getType

public abstract String getType()


Copyright © 2013. All Rights Reserved.