com.dyuproject.web.auth
Class SimpleCredentialSource

java.lang.Object
  extended by com.dyuproject.web.auth.SimpleCredentialSource
All Implemented Interfaces:
CredentialSource

public class SimpleCredentialSource
extends Object
implements CredentialSource

The credentials are retrieved from java.util.Properties.

Author:
David Yu

Constructor Summary
SimpleCredentialSource()
           
SimpleCredentialSource(Properties properties)
           
 
Method Summary
 String getPassword(String realm, String username, HttpServletRequest request)
           
 void onAuthenticated(String realm, String username, String password, HttpServletRequest request, HttpServletResponse response)
           
 void setProperties(File location)
           
 void setProperties(InputStream stream)
           
 void setProperties(Properties properties)
           
 void setProperties(URL location)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCredentialSource

public SimpleCredentialSource()

SimpleCredentialSource

public SimpleCredentialSource(Properties properties)
Method Detail

setProperties

public void setProperties(Properties properties)

setProperties

public void setProperties(InputStream stream)

setProperties

public void setProperties(File location)
                   throws IOException
Throws:
IOException

setProperties

public void setProperties(URL location)
                   throws IOException
Throws:
IOException

getPassword

public String getPassword(String realm,
                          String username,
                          HttpServletRequest request)
Specified by:
getPassword in interface CredentialSource

onAuthenticated

public void onAuthenticated(String realm,
                            String username,
                            String password,
                            HttpServletRequest request,
                            HttpServletResponse response)
                     throws ServletException,
                            IOException
Specified by:
onAuthenticated in interface CredentialSource
Throws:
ServletException
IOException


Copyright © 2013. All Rights Reserved.