org.objectweb.security.context
Class Marshalling

java.lang.Object
  extended by org.objectweb.security.context.Marshalling

public class Marshalling
extends java.lang.Object

Class allowing to marshall/unmarshall Security Context class

Author:
Guillaume Riviere (initial developer), Florent Benoit

Field Summary
static int SEC_CTX_ID
          security context id
 
Method Summary
static byte[] marshallSecurityContext(SecurityContext ctx)
          Custom UTF8 marshalling SecurityContext The resulting bute array is composed of the following elements: principal-name, roles-number, role1, ...., runas-number, runas1, ....
static SecurityContext unmarshallSecurityContext(byte[] byteCtx)
          Custom UTF8 marshalling SecurityContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEC_CTX_ID

public static final int SEC_CTX_ID
security context id

See Also:
Constant Field Values
Method Detail

marshallSecurityContext

public static byte[] marshallSecurityContext(SecurityContext ctx)
Custom UTF8 marshalling SecurityContext The resulting bute array is composed of the following elements: principal-name, roles-number, role1, ...., runas-number, runas1, .... then principal stack then roles of principal stack

Parameters:
ctx - SecurityContext
Returns:
byte [] the marshalled context

unmarshallSecurityContext

public static SecurityContext unmarshallSecurityContext(byte[] byteCtx)
Custom UTF8 marshalling SecurityContext

Parameters:
byteCtx - the marshalled context
Returns:
SecurityContext