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
Date created:
Jun 29, 2008

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

Constructor Detail

SimpleCredentialSource

public SimpleCredentialSource(Properties properties)
Method Detail

newInstance

public static SimpleCredentialSource newInstance(File file)
                                          throws IOException
Throws:
IOException

newInstance

public static SimpleCredentialSource newInstance(URL url)
                                          throws IOException
Throws:
IOException

newInstance

public static SimpleCredentialSource newInstance(InputStream stream)
                                          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 © 2008-2013. All Rights Reserved.