This repository was archived by the owner on Dec 12, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
extensions/servlet/src/main/java/com/stormpath/sdk/servlet/mvc Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -337,8 +337,16 @@ protected AccessTokenResult stormpathFactorChallengeAuthenticationRequest(HttpSe
337337 return createAccessTokenResult (request , response , authenticationResult );
338338 }
339339
340- private OAuthException convertToOAuthException (ResourceException e , OAuthErrorCode defaultErrorCode ) {
341- com .stormpath .sdk .error .Error error = e .getStormpathError ();
340+ /**
341+ * Takes a {@link ResourceException ResourceException} thrown when retrieving an oauth token and exposes
342+ * select fields from its Error to be returned as an {@link OAuthException OAuthException}.
343+ *
344+ * @param resourceException the ResourceException to convert
345+ * @param defaultErrorCode the OAuthErrorCode to use in case none is supplied in the underlying Error
346+ * @return an OAuthException exposing select fields depending on the value of the action property
347+ */
348+ private OAuthException convertToOAuthException (ResourceException resourceException , OAuthErrorCode defaultErrorCode ) {
349+ com .stormpath .sdk .error .Error error = resourceException .getStormpathError ();
342350 String message = error .getMessage ();
343351
344352 OAuthErrorCode oauthError = defaultErrorCode ;
You can’t perform that action at this time.
0 commit comments