xmlBlaster 2.1.0 API

org.xmlBlaster.authentication.plugins.demo
Class ClientPlugin

java.lang.Object
  extended by org.xmlBlaster.authentication.plugins.demo.ClientPlugin
All Implemented Interfaces:
I_ClientPlugin, I_MsgSecurityInterceptor

public class ClientPlugin
extends java.lang.Object
implements I_ClientPlugin

Class for java clients, decrypting messages which came from the corresponding security plugin.

If for example the server security plugin crypts messages with rot13, we need to decrypt it on the client side with the same algorithm. This is done here.


Field Summary
private  Global glob
           
static java.lang.String ME
           
 
Constructor Summary
ClientPlugin()
           
 
Method Summary
 I_SecurityQos createSecurityQos()
          The client application can use this method to get a new I_SecurityQos instance, and use it to set userId/password etc.
private  byte[] crypt(byte[] byteArr)
          Well, rot13 is no encryption, but it illustrates what importMessage and ExportMessage could do.
private  byte[] exportMessage(byte[] byteArr)
           
 MsgUnitRaw exportMessage(CryptDataHolder dataHolder)
          encrypt, sign, seal an outgoing message.
 java.lang.String getType()
           
 java.lang.String getVersion()
           
private  byte[] importMessage(byte[] byteArr)
           
 MsgUnitRaw importMessage(CryptDataHolder dataHolder)
          decrypt, check, unseal an incomming message.
private  java.lang.String importMessage(java.lang.String xmlMsg)
          decrypt, check, unseal etc an incomming message.
 void init(Global glob, PluginInfo pluginInfo)
           
 void setSessionData(java.lang.String sessionData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

public static final java.lang.String ME
See Also:
Constant Field Values

glob

private Global glob
Constructor Detail

ClientPlugin

public ClientPlugin()
Method Detail

init

public void init(Global glob,
                 PluginInfo pluginInfo)
Specified by:
init in interface I_ClientPlugin

getType

public java.lang.String getType()
Specified by:
getType in interface I_ClientPlugin
Returns:
The plugin type, e.g. "htpasswd"

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface I_ClientPlugin
Returns:
The plugin version, e.g. "1.0"

createSecurityQos

public I_SecurityQos createSecurityQos()
The client application can use this method to get a new I_SecurityQos instance, and use it to set userId/password etc.

Specified by:
createSecurityQos in interface I_ClientPlugin

setSessionData

public void setSessionData(java.lang.String sessionData)
Specified by:
setSessionData in interface I_ClientPlugin

importMessage

public MsgUnitRaw importMessage(CryptDataHolder dataHolder)
                         throws XmlBlasterException
decrypt, check, unseal an incomming message.

Specified by:
importMessage in interface I_MsgSecurityInterceptor
Parameters:
MsgUnitRaw - The the received message
MethodName - The name of the method which is intercepted
Returns:
MsgUnitRaw The original message
Throws:
XmlBlasterException - Thrown i.e. if the message has been modified
See Also:
I_MsgSecurityInterceptor.exportMessage(CryptDataHolder)

importMessage

private java.lang.String importMessage(java.lang.String xmlMsg)
                                throws XmlBlasterException
decrypt, check, unseal etc an incomming message.

Parameters:
String - The the received message
Returns:
String The original message
Throws:
XmlBlasterException - Thrown i.e. if the message has been modified

importMessage

private byte[] importMessage(byte[] byteArr)
                      throws XmlBlasterException
Throws:
XmlBlasterException

exportMessage

public MsgUnitRaw exportMessage(CryptDataHolder dataHolder)
                         throws XmlBlasterException
encrypt, sign, seal an outgoing message.

Specified by:
exportMessage in interface I_MsgSecurityInterceptor
Parameters:
MsgUnitRaw - The source message
Returns:
MsgUnitRaw
Throws:
XmlBlasterException - Thrown if the message cannot be processed
See Also:
I_MsgSecurityInterceptor.importMessage(CryptDataHolder)

exportMessage

private byte[] exportMessage(byte[] byteArr)
                      throws XmlBlasterException
Throws:
XmlBlasterException

crypt

private byte[] crypt(byte[] byteArr)
Well, rot13 is no encryption, but it illustrates what importMessage and ExportMessage could do.


xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.