@Override public WSTrustException wsTrustCombinedSecretKeyError(Throwable t) { return new WSTrustException(ErrorCodes.STS_COMBINED_SECRET_KEY_ERROR, t); }
@Override public WSTrustException stsKeyInfoTypeCreationError(Throwable t) { return new WSTrustException(ErrorCodes.PROCESSING_EXCEPTION + "Error creating KeyInfoType", t); }
@Override public WSTrustException wsTrustCombinedSecretKeyError(Throwable t) { return new WSTrustException(ErrorCodes.STS_COMBINED_SECRET_KEY_ERROR, t); }
@Override public WSTrustException stsKeyInfoTypeCreationError(Throwable t) { return new WSTrustException(ErrorCodes.PROCESSING_EXCEPTION + "Error creating KeyInfoType", t); }
@Override public WSTrustException wsTrustClientPublicKeyError() { return new WSTrustException(ErrorCodes.STS_CLIENT_PUBLIC_KEY_ERROR); }
@Override public WSTrustException wsTrustClientPublicKeyError() { return new WSTrustException(ErrorCodes.STS_CLIENT_PUBLIC_KEY_ERROR); }
@Override public WSTrustException stsWSInvalidRequestTypeError(String requestType) { return new WSTrustException(ErrorCodes.STS_INVALID_REQUEST_TYPE + requestType); }
@Override public WSTrustException stsWSInvalidRequestTypeError(String requestType) { return new WSTrustException(ErrorCodes.STS_INVALID_REQUEST_TYPE + requestType); }
@Override public WSTrustException wsTrustCombinedSecretKeyError(Throwable t) { return new WSTrustException(ErrorCodes.STS_COMBINED_SECRET_KEY_ERROR, t); }
@Override public WSTrustException wsTrustClientPublicKeyError() { return new WSTrustException(ErrorCodes.STS_CLIENT_PUBLIC_KEY_ERROR); }
@Override public WSTrustException stsWSInvalidRequestTypeError(String requestType) { return new WSTrustException(ErrorCodes.STS_INVALID_REQUEST_TYPE + requestType); }
@Override public WSTrustException stsKeyInfoTypeCreationError(Throwable t) { return new WSTrustException(ErrorCodes.PROCESSING_EXCEPTION + "Error creating KeyInfoType", t); }
@Override public WSTrustException stsError(Throwable t) { return new WSTrustException(t.getMessage(), t); }
@Override public WSTrustException stsError(Throwable t) { return new WSTrustException(t.getMessage(), t); }
@Override public WSTrustException stsError(Throwable t) { return new WSTrustException(t.getMessage(), t); }
private DOMSource createSourceFromRequest(RequestSecurityToken request) throws WSTrustException { try { DOMResult result = new DOMResult(DocumentUtil.createDocument()); WSTrustRequestWriter writer = new WSTrustRequestWriter(result); writer.write(request); return new DOMSource(result.getNode()); } catch (Exception e) { throw new WSTrustException(logger.processingError(e)); } }
private DOMSource createSourceFromRequest(RequestSecurityToken request) throws WSTrustException { try { DOMResult result = new DOMResult(DocumentUtil.createDocument()); WSTrustRequestWriter writer = new WSTrustRequestWriter(result); writer.write(request); return new DOMSource(result.getNode()); } catch (Exception e) { throw new WSTrustException(logger.processingError(e)); } }
@Override public Element issueToken(RequestSecurityToken request) throws WSTrustException { if (requestType.equals(WSTrustConstants.VALIDATE_REQUEST)) { request.setRequestType(URI.create(requestType)); ValidateTargetType validateTarget = new ValidateTargetType(); try { String sUserName = JBWSTokenIssuingLoginModule.this.getSharedUsername(); char[] cPassword = JBWSTokenIssuingLoginModule.this.getSharedPassword(); Element wsseUsernameToken = createUsernameToken(sUserName, (cPassword != null ? new String(cPassword) : null)); validateTarget.add(wsseUsernameToken); request.setValidateTarget(validateTarget); } catch (SOAPException e) { throw new WSTrustException(e); } } return super.issueToken(request); }
@Override public Element issueToken(RequestSecurityToken request) throws WSTrustException { if (requestType.equals(WSTrustConstants.VALIDATE_REQUEST)) { request.setRequestType(URI.create(requestType)); ValidateTargetType validateTarget = new ValidateTargetType(); try { String sUserName = JBWSTokenIssuingLoginModule.this.getSharedUsername(); char[] cPassword = JBWSTokenIssuingLoginModule.this.getSharedPassword(); Element wsseUsernameToken = createUsernameToken(sUserName, (cPassword != null ? new String(cPassword) : null)); validateTarget.add(wsseUsernameToken); request.setValidateTarget(validateTarget); } catch (SOAPException e) { throw new WSTrustException(e); } } return super.issueToken(request); }
throw new WSTrustException(logger.processingError(e)); throw new WSTrustException(logger.nullValueError("NodeList")); throw new WSTrustException(logger.nullValueError("RSTR in the payload"));