Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle IMAP XOAuth only working for Authentication
    primarykey
    data
    text
    <p>I am trying to use XOAuth to populate a portlet with the most recent messages from the Google Apps Inbox. However it seems to be fighting me every step of the way. I'm using the 2-Legged code from: <a href="http://code.google.com/p/google-mail-xoauth-tool-java-two-legged/" rel="nofollow">This Page</a>.</p> <p>I was having trouble authenticating but after backing my Javamail version down to 1.4 auth started working. However now I get an <strong>Invalid Credentials</strong> error whenever I try to list folder contents or even <em>EXAMINE</em> a folder.</p> <pre><code>DEBUG: setDebug: JavaMail version 1.4ea DEBUG: mail.imap.fetchsize: 16384 DEBUG: enable SASL DEBUG: SASL mechanisms allowed: XOAUTH * OK Gimap ready for requests from 198.133.178.17 o7if44308676igp.16 A0 CAPABILITY * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH A0 OK Thats all she wrote! o7if44308676igp.16 IMAP DEBUG: AUTH: XOAUTH DEBUG: protocolConnect login, host=imap.gmail.com, user=user@cnm.edu, password=&lt;non-null&gt; IMAP SASL DEBUG: Mechanisms: XOAUTH IMAP SASL DEBUG: SASL client XOAUTH A1 AUTHENTICATE XOAUTH + IMAP SASL DEBUG: challenge: : IMAP SASL DEBUG: response: GET https://mail.google.com/mail/b/user@cnm.edu/imap/?xoauth_requestor_id=user%40cnm.edu oauth_consumer_key="cnm.edu",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1335245518",oauth_nonce="4720724339258128",oauth_version="1.0",oauth_signature="7HAU4923Gy7%2Ffqb3avk7Tg%2FXtVM%3D" : R0VUIGh0dHBzOi8vbWFpbC5nb29nbGUuY29tL21haWwvYi9saG9sY29tYjJAY25tLmVkdS9pbWFwLz94b2F1dGhfcmVxdWVzdG9yX2lkPWxob2xjb21iMiU0MGNubS5lZHUgb2F1dGhfY29uc3VtZXJfa2V5PSJjbm0uZWR1IixvYXV0aF9zaWduYXR1cmVfbWV0aG9kPSJITUFDLVNIQTEiLG9hdXRoX3RpbWVzdGFtcD0iMTMzNTI0NTUxOCIsb2F1dGhfbm9uY2U9IjQ3MjA3MjQzMzkyNTgxMjgiLG9hdXRoX3ZlcnNpb249IjEuMCIsb2F1dGhfc2lnbmF0dXJlPSI3SEFVNDkyM0d5NyUyRmZxYjNhdms3VGclMkZYdFZNJTNEIg== got folder: INBOX DEBUG: connection available -- size: 1 A2 EXAMINE INBOX A1 NO [ALERT] Invalid credentials (Failure) A2 BAD Unknown command o7if44308676igp.16 A3 LOGOUT * BYE Logout Requested o7if44308676igp.16 A3 OK Quoth the raven, nevermore... o7if44308676igp.16 Exception in thread "main" javax.mail.MessagingException: A2 BAD Unknown command o7if44308676igp.16; nested exception is: com.sun.mail.iap.BadCommandException: A2 BAD Unknown command o7if44308676igp.16 at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:829) at TwoLegged.main(TwoLegged.java:37) Caused by: com.sun.mail.iap.BadCommandException: A2 BAD Unknown command o7if44308676igp.16 at com.sun.mail.iap.Protocol.handleResult(Protocol.java:296) at com.sun.mail.imap.protocol.IMAPProtocol.examine(IMAPProtocol.java:636) at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:811) ... 1 more </code></pre> <p>I'm at a loss at this point. The <a href="https://developers.google.com/google-apps/gmail/oauth_protocol" rel="nofollow">Gmail OAuth Docs</a> don't indicate that any request other than Authentication needs to be signed but the <strong>Invalid Credentials</strong> error seems to imply otherwise?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload