com.dyuproject.web.auth
Class BasicAuthentication

java.lang.Object
  extended by com.dyuproject.web.auth.Authentication
      extended by com.dyuproject.web.auth.BasicAuthentication

public class BasicAuthentication
extends Authentication

Web authorization using BASIC. Use only if in secure https mode because the user/pass is passed in clear test.

Author:
David Yu

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

Field Detail

TYPE

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

BasicAuthentication

public BasicAuthentication(CredentialSource credentialSource)
Method Detail

getType

public String getType()
Specified by:
getType in class Authentication

authenticate

public boolean authenticate(String realm,
                            HttpServletRequest request,
                            HttpServletResponse response)
                     throws ServletException,
                            IOException
Specified by:
authenticate in class Authentication
Throws:
ServletException
IOException


Copyright © 2013. All Rights Reserved.