4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet Class Reference

Servlet which allows Drupal CMS to send informations about it's users. More...

Inheritance diagram for cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet:
Inheritance graph
Collaboration diagram for cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet:
Collaboration graph

Public Member Functions

String getServletInfo ()
 

Protected Member Functions

void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 
void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 

Private Member Functions

void saveUsers (List users, Map< String, String > aData)
 
User processUser (Element userEl, Map< String, String > authData, String drupalAddress)
 
String loadDefaultSettings (User user)
 
boolean isAuthorizedByIp (String ipAdderess)
 
boolean isAuthorizedByName (String hostName)
 

Static Private Member Functions

static String getError ()
 
static Document parseXml (String XMLString) throws SAXException, ParserConfigurationException, IOException
 

Detailed Description

Servlet which allows Drupal CMS to send informations about it's users.

Servlet which allows Drupal CMS to send informations about it's users, so users can be authenticated automatically with these informations. If user haven't account yet, it will be created.

Author
idytrych

Definition at line 67 of file DrupAuthServlet.java.

Member Function Documentation

void cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet.doGet ( HttpServletRequest  request,
HttpServletResponse  response 
) throws ServletException, IOException
protected

Handles the HTTP GET method.

Parameters
requestservlet request
responseservlet response
Exceptions
ServletExceptionif a servlet-specific error occurs
IOExceptionif an I/O error occurs

Definition at line 78 of file DrupAuthServlet.java.

Here is the call graph for this function:

void cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet.doPost ( HttpServletRequest  request,
HttpServletResponse  response 
) throws ServletException, IOException
protected

Handles the HTTP POST method.

Parameters
requestservlet request
responseservlet response
Exceptions
ServletExceptionif a servlet-specific error occurs
IOExceptionif an I/O error occurs

Definition at line 101 of file DrupAuthServlet.java.

Here is the call graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet.getError ( )
staticprivate

Gets error page (there is not much informations because it can be used by attacker)

Returns
Returns content of the error page

Definition at line 370 of file DrupAuthServlet.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet.getServletInfo ( )

Returns a short description of the servlet.

Returns
a String containing servlet description

Definition at line 407 of file DrupAuthServlet.java.

boolean cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet.isAuthorizedByIp ( String  ipAdderess)
private

Method checks if request come from authorized server.

Parameters
ipAdderessip addres of server
Returns
true value indicate thet server is authorized, false indicates unauthorized request

Definition at line 441 of file DrupAuthServlet.java.

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet.isAuthorizedByName ( String  hostName)
private

Method checks if request come from authorized server.

Parameters
hostNamehost name of server
Returns
true value indicate thet server is authorized, false indicates unauthorized request

Definition at line 464 of file DrupAuthServlet.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet.loadDefaultSettings ( User  user)
private

Definition at line 411 of file DrupAuthServlet.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static Document cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet.parseXml ( String  XMLString) throws SAXException, ParserConfigurationException, IOException
staticprivate

Parses XML with data

Parameters
XMLStringString with XML with data from Drupal
Returns
Parsed XML in w3c.dom.Document

Definition at line 388 of file DrupAuthServlet.java.

Here is the caller graph for this function:

User cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet.processUser ( Element  userEl,
Map< String, String >  authData,
String  drupalAddress 
)
private

Processes XML element with data about user and returns User object. If user is already in database, saved object will be returned. If user is not in database, new object will be created. It also stores authentication data into the given map.

Parameters
userElXML element with data about user
authDataMap to which authentication data will be stored.
drupalAddressAddress from which user comes
Returns
Returns User object of the given user.

Definition at line 282 of file DrupAuthServlet.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.DrupAuthServlet.saveUsers ( List  users,
Map< String, String >  aData 
)
private

Saves data about users to the database and authentication data to AppBean

Parameters
usersList of users to save
aDataMap with authentication data

Definition at line 207 of file DrupAuthServlet.java.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: