Methods Summary |
---|
public java.lang.String | getIncludeToken()
populate();
return includeToken;
|
public com.sun.xml.ws.security.policy.Issuer | getIssuer()
populate();
return issuer;
|
public com.sun.xml.ws.security.policy.RequestSecurityTokenTemplate | getRequestSecurityTokenTemplate()
populate();
return rstTemplate;
|
public java.lang.String | getTokenId()
return id;
|
public java.util.Iterator | getTokenRefernceType()
populate();
return referenceType.iterator();
|
public boolean | isRequireDerivedKeys()
populate();
return reqDK;
|
private void | populate()
populate(false);
|
private synchronized AssertionFitness | populate(boolean isServer)
if(!populated){
if(this.getAttributeValue(itQname)!=null){
this.includeToken = this.getAttributeValue(itQname);
}
if ( this.hasNestedAssertions() ) {
Iterator <PolicyAssertion> it = this.getNestedAssertionsIterator();
while ( it.hasNext() ) {
PolicyAssertion assertion = it.next();
if ( PolicyUtil.isIssuer(assertion) ) {
this.issuer = (Issuer) assertion;
} else if ( PolicyUtil.isRequestSecurityTokenTemplate(assertion)) {
this.rstTemplate = (RequestSecurityTokenTemplate) assertion;
}else{
if(!assertion.isOptional()){
log_invalid_assertion(assertion, isServer,IssuedToken);
fitness = AssertionFitness.HAS_UNKNOWN_ASSERTION;
}
}
}
}
NestedPolicy policy = this.getNestedPolicy();
if(policy == null){
if(logger.getLevel() == Level.FINE){
logger.log(Level.FINE,"NestedPolicy is null");
}
populated = true;
return fitness;
}
AssertionSet as = policy.getAssertionSet();
if(as == null){
if(logger.getLevel() == Level.FINE){
logger.log(Level.FINE," Nested Policy is empty");
}
populated = true;
return fitness;
}
Iterator<PolicyAssertion> ast = as.iterator();
while(ast.hasNext()){
PolicyAssertion assertion = ast.next();
if(referenceType == null){
referenceType = new ArrayList<String>();
}
if ( PolicyUtil.isRequireDerivedKeys(assertion)) {
reqDK = true;
} else if ( PolicyUtil.isRequireExternalReference(assertion)) {
referenceType.add(assertion.getName().getLocalPart().intern());
} else if ( PolicyUtil.isRequireInternalReference(assertion)) {
referenceType.add(assertion.getName().getLocalPart().intern());
} else{
if(!assertion.isOptional()){
log_invalid_assertion(assertion, isServer,IssuedToken);
fitness = AssertionFitness.HAS_UNKNOWN_ASSERTION;
}
}
}
populated = true;
}
return fitness;
|
public void | setIncludeToken(java.lang.String type)
//includeToken = type;
throw new UnsupportedOperationException();
|
public AssertionFitness | validate(boolean isServer)
return populate(isServer);
|