com.groiss.org
Class PasswdAuth

java.lang.Object
  extended by com.groiss.org.PasswdAuth
All Implemented Interfaces:
HttpAuth, Public
Direct Known Subclasses:
SSLAuth

public class PasswdAuth
extends java.lang.Object
implements HttpAuth, Public

The default Authorization class.


Constructor Summary
PasswdAuth()
           
 
Method Summary
 java.security.Principal checkUser(java.lang.String userId, java.lang.String passwd, java.lang.String clientAddr)
          This method gets the parameters necessary for checking if the user is allowed to connect to the server.
 void sendLoginRequest(javax.servlet.http.HttpServletRequest r, javax.servlet.http.HttpServletResponse res)
          This method is called by the server, when authorization is required and the client must be requested for login information.
 void setAuthorizationCookie(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Answers the request from the login mask.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswdAuth

public PasswdAuth()
Method Detail

sendLoginRequest

public void sendLoginRequest(javax.servlet.http.HttpServletRequest r,
                             javax.servlet.http.HttpServletResponse res)
                      throws java.lang.Exception
Description copied from interface: HttpAuth
This method is called by the server, when authorization is required and the client must be requested for login information. It typically sends a HTML page containing a login form or applet to the browser.

Specified by:
sendLoginRequest in interface HttpAuth
Parameters:
r - the HTTP Request
res - the HTTP Response, where the HTML-page must be written to.
Throws:
java.lang.Exception

setAuthorizationCookie

public void setAuthorizationCookie(javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)
                            throws java.lang.Exception
Answers the request from the login mask.

Throws:
java.lang.Exception

checkUser

public java.security.Principal checkUser(java.lang.String userId,
                                         java.lang.String passwd,
                                         java.lang.String clientAddr)
                                  throws java.lang.Exception
Description copied from interface: HttpAuth
This method gets the parameters necessary for checking if the user is allowed to connect to the server. If the user is not allowed to connect an exception containing the reason is thrown.

Specified by:
checkUser in interface HttpAuth
Parameters:
userId - a string determining the id of the user who wants to get connected
passwd - the password of the user
clientAddr - the ip-address of the client from which the user wants to connect
Throws:
java.lang.Exception
See Also:
HttpAuth.checkUser(java.lang.String, java.lang.String, java.lang.String)


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.