private String getDetails(Throwable e) { String error = null; if (null != e) { if(e instanceof OAuthRequestException) { OAuthRequestException reqException = ((OAuthRequestException) e); error = reqException.getError() + ", " + reqException.getErrorText(); } else { error = e.getMessage(); } } return "OAuth error [" + error + "] for application " + securityToken.getAppUrl() + ". Request trace:" + getRequestTrace(); }
private String getDetails(Throwable e) { String error = null; if (null != e) { if(e instanceof OAuthRequestException) { OAuthRequestException reqException = ((OAuthRequestException) e); error = reqException.getError() + ", " + reqException.getErrorText(); } else { error = e.getMessage(); } } return "OAuth error [" + error + "] for application " + securityToken.getAppUrl() + ". Request trace:" + getRequestTrace(); }
private String getDetails(Throwable e) { String error = null; if (null != e) { if(e instanceof OAuthRequestException) { OAuthRequestException reqException = ((OAuthRequestException) e); error = reqException.getError() + ", " + reqException.getErrorText(); } else { error = e.getMessage(); } } return "OAuth error [" + error + "] for application " + securityToken.getAppUrl() + ". Request trace:" + getRequestTrace(); }
/** * Update a response with additional data to be returned to the application. */ public void addToResponse(HttpResponseBuilder response, OAuthRequestException e) { if (!newClientState.isEmpty()) { try { response.setMetadata(CLIENT_STATE, newClientState.getEncryptedState()); } catch (BlobCrypterException cryptException) { // Configuration error somewhere, this should never happen. throw new RuntimeException(cryptException); } } if (aznUrl != null) { response.setMetadata(APPROVAL_URL, aznUrl); } if (e != null || sendTraceToClient) { StringBuilder verboseError = new StringBuilder(); if (e != null) { response.setMetadata(ERROR_CODE, e.getError()); verboseError.append(e.getErrorText()); } if (sendTraceToClient) { verboseError.append('\n'); verboseError.append(getRequestTrace()); } response.setMetadata(ERROR_TEXT, verboseError.toString()); } }
/** * Update a response with additional data to be returned to the application. */ public void addToResponse(HttpResponseBuilder response, OAuthRequestException e) { if (!newClientState.isEmpty()) { try { response.setMetadata(CLIENT_STATE, newClientState.getEncryptedState()); } catch (BlobCrypterException cryptException) { // Configuration error somewhere, this should never happen. throw new RuntimeException(cryptException); } } if (aznUrl != null) { response.setMetadata(APPROVAL_URL, aznUrl); } if (e != null || sendTraceToClient) { StringBuilder verboseError = new StringBuilder(); if (e != null) { response.setMetadata(ERROR_CODE, e.getError()); verboseError.append(e.getErrorText()); } if (sendTraceToClient) { verboseError.append('\n'); verboseError.append(getRequestTrace()); } response.setMetadata(ERROR_TEXT, verboseError.toString()); } }
/** * Update a response with additional data to be returned to the application. */ public void addToResponse(HttpResponseBuilder response, OAuthRequestException e) { if (!newClientState.isEmpty()) { try { response.setMetadata(CLIENT_STATE, newClientState.getEncryptedState()); } catch (BlobCrypterException cryptException) { // Configuration error somewhere, this should never happen. throw new RuntimeException(cryptException); } } if (aznUrl != null) { response.setMetadata(APPROVAL_URL, aznUrl); } if (e != null || sendTraceToClient) { StringBuilder verboseError = new StringBuilder(); if (e != null) { response.setMetadata(ERROR_CODE, e.getError()); verboseError.append(e.getErrorText()); } if (sendTraceToClient) { verboseError.append('\n'); verboseError.append(getRequestTrace()); } response.setMetadata(ERROR_TEXT, verboseError.toString()); } }