Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feat/#41 exception handling (#377) merge from fork(most part is done, will keep working on the branch instead of fork.) * -added an error message in status.yml for validating response content -now deserialize content string before do validation -fixed a issue when matching a given uri with schema, now remove query parameters from uri -changed some testing content * -changed status code and moved it to swagger-validator errors position. * -changed OauthHelper.getToken return type to com.networknt.monad.Result so that it can keep Status info when fail -refactored token handler so that it can handle error situation. * -changed Http2Client only get token when success response. and log error when fail. * -added a Jwt model to be used in multiple places to store jwt info. -added more error scenarios when get token from auth server -refactored TokenHandler -added Error Handling for SAMLTokenHandler * -instead of throwing exceptions, all methods that needs to call OauthHelper.populateCCToken have changed return type to "Result" -to avoid modifying class members, move checkCCExpired() method from Http2Client to OauthHelper, and make it public static so that it can be use in multiple modules -TokenHandler in light-router will also use OauthHelper to populate client credential token -added ClientException check in ExceptionHandler -added Status field in ClientException * -changed synchronized(Http2Client.class) to synchronized(OauthHelper.class) since it's moved to OauthHelper now * -created a Enum "ContentType" in http-string -in OauthHelper, whenever needs to pass auth server's response to the client, now it will escape based on the type that the server returns. -related pull request: #380 * Removing some unused commits * Fixing bad merge * -fixed duplicate escape response * -added class level comments
- Loading branch information