.ietf.org/html/draft-ietf-oauth-v2-23#section-4.1.2">Authorization Response.
Check if {@link #getError()} is {@code null} to check if the end-user granted authorization.
Sample usage:
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { StringBuffer fullUrlBuf = request.getRequestURL(); if (request.getQueryString() != null) { fullUrlBuf.append('?').append(request.getQueryString()); } AuthorizationCodeResponseUrl authResponse = new AuthorizationCodeResponseUrl(fullUrlBuf.toString()); // check for user-denied error if (authResponse.getError() != null) { // authorization denied... } else { // request access token using authResponse.getCode()... } }
Implementation is not thread-safe.
@since 1.7
@author Yaniv Inbar