Eccezione lanciata quando nella request a Facebook manca il token restituito nella response della login.
codice di socialAuth che lancia l’SocialAuthException:
@Override<br /> <span style="color: #7f0055; font-weight: normal;"><b>public</b></span> Profile verifyResponse(<span style="color: #7f0055; font-weight: normal;"><b>final</b></span> HttpServletRequest httpReq)<br /> <span style="color: #7f0055; font-weight: normal;"><b>throws</b></span> Exception {<br /> LOG.info(<span style="color: #2a00ff; font-weight: normal;">"Retrieving Access Token in verify response function"</span>);<br /> <span style="color: #7f0055; font-weight: normal;"><b>if</b></span> (httpReq.getParameter(<span style="color: #2a00ff; font-weight: normal;">"error_reason"</span>) != null<br /> && <span style="color: #2a00ff; font-weight: normal;">"user_denied"</span>.equals(httpReq.getParameter(<span style="color: #2a00ff; font-weight: normal;">"error_reason"</span>))) {<br /> <span style="color: #7f0055; font-weight: normal;"><b>throw</b></span> <span style="color: #7f0055; font-weight: normal;"><b>new</b></span> UserDeniedPermissionException();<br /> }<br /> <span style="color: #7f0055; font-weight: normal;"><b>if</b></span> (!isProviderState()) {<br /> <span style="color: #7f0055; font-weight: normal;"><b>throw</b></span> <span style="color: #7f0055; font-weight: normal;"><b>new</b></span> ProviderStateException();<br /> }<br /> String code = httpReq.getParameter(<span style="color: #2a00ff; font-weight: normal;">"code"</span>);<br /> <span style="color: #7f0055; font-weight: normal;"><b>if</b></span> (code == null || code.length() == 0) {<br /> <span style="color: #7f0055; font-weight: normal;"><b>throw</b></span> <span style="color: #7f0055; font-weight: normal;"><b>new</b></span> <b>SocialAuthException</b>(<span style="color: #2a00ff; font-weight: normal;">"</span><span style="color: #2a00ff;"><b>Verification code is null</b></span><span style="color: #2a00ff; font-weight: normal;">"</span>);<br /> }