public SamlTokenCreator(SamlToken spec,Certificate stsCert,Key key) throws ParserException {
  _spec=spec;
  Document assertion=createAssertion();
  signMessage(assertion.getDocumentElement(),"#" + ASSERTION_ID,key,stsCert);
  samlToken=Util.serializeToString(assertion);
}

public SamlTokenCreator ( SamlToken spec , Certificate stsCert , Key key ) throws ParserException { _spec = spec ; Document assertion = createAssertion ( ) ; signMessage ( assertion . getDocumentElement ( ) , "#" + ASSERTION_ID , key , stsCert ) ; samlToken = Util . serializeToString ( assertion ) ; }
create new saml token . needed data : token specification , certificate and private key to sign the new token .
