org.openxri.server.impl
Class TrustedServer

java.lang.Object
  extended by org.openxri.config.impl.AbstractComponent
      extended by org.openxri.server.impl.AbstractServer
          extended by org.openxri.server.impl.BasicServer
              extended by org.openxri.server.impl.TrustedServer
All Implemented Interfaces:
java.io.Serializable, Component, Server

public class TrustedServer
extends BasicServer

An extension to BasicServer that adds trust information to the XRD before it is sent out. TODO: Fix everything and implement trusted resolution correctly.

Author:
=peacekeeper
See Also:
Serialized Form

Field Summary
static java.lang.String CONFIG_CERTIFICATE_LOCATION
           
static java.lang.String CONFIG_PRIVATE_KEY_LOCATION
           
static java.lang.String CONFIG_SAML_ISSUER
           
protected static org.apache.commons.logging.Log log
           
 
Fields inherited from class org.openxri.server.impl.AbstractServer
store
 
Fields inherited from class org.openxri.config.impl.AbstractComponent
properties
 
Constructor Summary
TrustedServer(java.util.Properties properties)
           
 
Method Summary
protected  void finishXRD(XRD xrd, Authority parentAuthority, SubSegment subSegment, Authority authority, boolean bSigned)
          Called before the server adds the XRD to the XRDS and moves on to the next authority.
protected  java.security.cert.X509Certificate[] getCertificateChain()
           
protected  java.security.PrivateKey getPrivateKey()
           
 void init()
          Initialize base-class attributes from configuration.
protected  boolean initXRDS(XRDS xrds, java.lang.String query, boolean bSigned)
          Called before the server starts processing the request.
 
Methods inherited from class org.openxri.server.impl.BasicServer
finishXRDS, initXRD
 
Methods inherited from class org.openxri.server.impl.AbstractServer
lookupByNamespace, lookupByPath, lookupSelfDescribing, makeExceptionXrd, makeNotFoundXrd
 
Methods inherited from class org.openxri.config.impl.AbstractComponent
getProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openxri.config.Component
getProperties
 

Field Detail

log

protected static org.apache.commons.logging.Log log

CONFIG_CERTIFICATE_LOCATION

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

CONFIG_PRIVATE_KEY_LOCATION

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

CONFIG_SAML_ISSUER

public static final java.lang.String CONFIG_SAML_ISSUER
See Also:
Constant Field Values
Constructor Detail

TrustedServer

public TrustedServer(java.util.Properties properties)
Method Detail

init

public void init()
Description copied from class: AbstractServer
Initialize base-class attributes from configuration.

Specified by:
init in interface Component
Overrides:
init in class BasicServer

initXRDS

protected boolean initXRDS(XRDS xrds,
                           java.lang.String query,
                           boolean bSigned)
                    throws ServerInternalException
Description copied from class: AbstractServer
Called before the server starts processing the request.

Overrides:
initXRDS in class BasicServer
Parameters:
xrds - - A blank XRDS which we will complete.
query - - The original XRI segment for which the request was made.
bSigned - - Whether we are expected to return a signed descriptor.
Returns:
If true, the AbstractServer will not add anything to the XRDS and send it out immediately.
Throws:
ServerInternalException

finishXRD

protected void finishXRD(XRD xrd,
                         Authority parentAuthority,
                         SubSegment subSegment,
                         Authority authority,
                         boolean bSigned)
                  throws ServerInternalException
Description copied from class: AbstractServer
Called before the server adds the XRD to the XRDS and moves on to the next authority. This method should be prepared to handle a null XRD.

Overrides:
finishXRD in class BasicServer
Parameters:
xrd - - A filled XRD ready to be appended to the XRDS.
parentAuthority - - The authority describing this XRD.
subSegment - - The subsegment leading to this XRD.
authority - - The authority described by this XRD.
bSigned - - Whether we are expected to return a signed descriptor.
Throws:
ServerInternalException

getCertificateChain

protected java.security.cert.X509Certificate[] getCertificateChain()

getPrivateKey

protected java.security.PrivateKey getPrivateKey()


Copyright © 2005-2012. All Rights Reserved.