org.openpermis.subject.format.x509
Class X509Encoder

java.lang.Object
  extended by org.openpermis.subject.format.x509.X509Encoder
All Implemented Interfaces:
Encoder

public class X509Encoder
extends Object
implements Encoder

Encodes roles assignments into X509 attribute certificates.

Since:
0.9.0

Constructor Summary
X509Encoder(X509Certificate certificate, PrivateKey privateKey, SerialNumberGenerator serialNumberGenerator)
          Creates a new X509 encoder.
 
Method Summary
 void encode(OutputStream out, URI holder, URI issuer, Set<RoleDefinition> roles, Date validFrom, Date validTo)
          Encodes a role assignment to the specified output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

X509Encoder

public X509Encoder(X509Certificate certificate,
                   PrivateKey privateKey,
                   SerialNumberGenerator serialNumberGenerator)
Creates a new X509 encoder.

Parameters:
certificate - the certificate of the issuer.
privateKey - the private key of the issuer used to sign the newly created certificate.
Since:
0.9.0
Method Detail

encode

public void encode(OutputStream out,
                   URI holder,
                   URI issuer,
                   Set<RoleDefinition> roles,
                   Date validFrom,
                   Date validTo)
            throws EncodingException,
                   IOException
Description copied from interface: Encoder
Encodes a role assignment to the specified output stream.

The output stream must be closed by the caller of this method.

Specified by:
encode in interface Encoder
Parameters:
out - the output stream to write the encoded role assignment.
holder - the holder of the role assignment.
issuer - the issuer of the role assignment.
roles - the issued roles of the role assignment.
validFrom - validity start of the role assignment.
validTo - validity end of the role assignment.
Throws:
EncodingException - signals a problem in encoding the role assignment.
IOException - signals a problem in writing to output stream.
Since:
0.9.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG