[Building Sakai] Sakai-Goolge Integration

Sanghyun Jeon euksa99 at gmail.com
Tue Aug 6 13:09:45 PDT 2013


Thank you for your reply, Ray,

I have not received any reply for a while and I am about to remove Google
integration. The error was generated when I clicked "Link to a Google Doc"
in the "Add" menu in Sakai Resources tool.
login as admin
Click My Workspace
Click Resources on the left menu bar
Click "Link to a Google Doc" in "Add" menu

Webpage displays as follows:
Unhandled Google Docs Error

An unexpected exception occurred while communicating with Google Docs. This
operation cannot be completed.


The debug log shows "2013-08-05 06:49:30.679 [ERROR]
com.rsmart.content.google.oauth.OAuthCallbackServlet:135 - post-login
return URL was not set, redirecting to error page"

because I added the below lines into log4j.properties:

log4j.logger.com.rsmart.content.google.api.GoogleOAuthConfigurationException=DEBUG,P
log4j.logger.com.rsmart.oauth.token.tool.util=DEBUG,P
log4j.logger.com.rsmart.oauth.api.OAuthTokenService=DEBUG,P
log4j.logger.com.rsmart.content.google.oauth.OAuthCallbackServlet=DEBUG,P
log4j.logger.com.rsmart.content.google.api.GoogleOAuthTokenNotFoundException=DEBUG,P


I followed the instruction in
https://source.sakaiproject.org/contrib/rsmart/google-content/trunk/

Especially GoogleDocsIntegrationConfiguration.pdf helps me to get consumer
key and secret from https://www.google.com/accounts/ManageDomains

I've never heard about two legged and three legged...


I never succeeded to connect to Google.

After I completed Oauth Providers, below is what I saw



[image: Inline image 1]



<https://source.sakaiproject.org/contrib/rsmart/google-content/trunk/GoogleDocsIntegrationConfiguration.pdf>



I am wondering Realm says" not used by Google" is right or not....

Any guide will be really appreciated.

S




On Mon, Aug 5, 2013 at 7:34 PM, Raymond Naseef <raymond.naseef at gmail.com>wrote:

> Hi Jeon,
>
> Sorry, I am not sure what you are facing.  If you could find and let me
> know where to see the code that is throwing the error, I may be able to
> give you some more help.
>
> You may want to check if this is using two legged authentication or three
> legged authentication.  I was looking into doing three legged
> authentication for a while, and remember one of the issues is in sending
> the oauth server URL to return to the client once it gets user's acceptance
> for the client to access their Google resources.
>
> The following pages talk some about 2-legged and 3-legged authentication:
>
>
> http://stackoverflow.com/questions/2880659/what-is-meant-by-two-legged-authentication
>   http://answers.oreilly.com/topic/1381-how-to-use-three-legged-oauth/
>
>
> Some other thoughts.  Do you know if they are using OAuth 1.0 or OAuth
> 2.0?  They need callback_url, and it may be the case your code is not
> passing them a valid callback_url.  That URL will be the URL the browser is
> forwarded to after they sign-in to Google to give your application access.
>
> Here is a Google page showing lots of details, although it is for OAuth 1:
>     https://developers.google.com/accounts/docs/OAuth_ref
>
>
> Good luck,
> Ray
>
>
> On Mon, Aug 5, 2013 at 6:38 PM, Sanghyun Jeon <euksa99 at gmail.com> wrote:
>
>> Can anybody reply this email?
>> I added more debug and got the below
>>
>> 2013-08-05 06:49:30.679 [ERROR]
>> com.rsmart.content.google.oauth.OAuthCallbackServlet:135 - post-login
>> return URL was not set, redirecting to error page
>>
>>
>> Please help.
>>
>>
>> S
>>
>>
>> On Mon, Jul 29, 2013 at 4:31 PM, Sanghyun Jeon <euksa99 at gmail.com> wrote:
>>
>>> Hello All,
>>>
>>> We are currently using Sakai 2.8.x_all and integrated with google in
>>> resource via rsmart instruction (
>>> https://source.sakaiproject.org/contrib/rsmart/google-content/trunk/GoogleDocsIntegrationConfiguration.pdf
>>> )
>>>
>>> Everything looks great: creating comsumer key and secret and adding this
>>> info into OAuth Providers tool in Admin Workspace,,,,,but  when we type
>>> https://mydomain.edu/google-content-tool/oauth<https://sakaidev.pomona.edu/google-content-tool/oauth>,
>>> we have the following errors:
>>>
>>> java.lang.NullPointerException
>>> 	com.rsmart.content.google.oauth.OAuthCallbackServlet.doGet(OAuthCallbackServlet.java:139)
>>> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
>>> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>>> 	org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:659)
>>>
>>>
>>>
>>> Tomcat error looks the same:
>>>
>>> 2013-07-29 16:17:24.698 [ERROR] org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/google-content-tool].[oauth.callback]:260 - Servlet.service() for servlet oauth.callback threw exception
>>> java.lang.NullPointerException
>>>         at com.rsmart.content.google.oauth.OAuthCallbackServlet.doGet(OAuthCallbackServlet.java:139)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>>         at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:659)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
>>>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>>>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>>>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>>>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>>>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
>>>         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>>>         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>>>         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>>>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>>>         at java.lang.Thread.run(Thread.java:662)
>>>
>>> I cannot find much information to resolve this issue....
>>>
>>> Does anybody tell me which part I need to check first in order to resolve this problem.....
>>>
>>>
>>> Thank you in advance.
>>>
>>>
>>> S
>>>
>>>
>>>
>>> On Thu, Jun 20, 2013 at 8:40 PM, Raymond Naseef <
>>> raymond.naseef at gmail.com> wrote:
>>>
>>>> Hi William,
>>>>
>>>> CTools at University of Michigan has some very nice Google stuff,
>>>> including:
>>>>   1 - Google Calendar project
>>>>   2 - "Google App" drop-down menu showing details on Mail, Calendar,
>>>> Drive, and Plus
>>>>   3 - "Google Drive LTI" - this is written so it can run independent of
>>>> Sakai project
>>>>   * - (I almost forgot) some nice prototypes, including one that would
>>>> be fine as a tool for working with Google Drive (but not useful for
>>>> integration with Sakai).
>>>>
>>>> It seems your timing to ask is rough, as CTools team is busy deploying
>>>> an update to production.
>>>>
>>>> I wrote quite a lot of the code for working on those (#2 and #3 are, or
>>>> were until this week, entirely my code).
>>>>
>>>> Check out https://source.sakaiproject.org/contrib/umich/google.
>>>>
>>>> Item #2 above has good documentation for implementing.  I do not know
>>>> about doc for #1, and #3 doc is weak.  #2 is probably by far the easiest to
>>>> get running, as it uses portal to add a drop-down "Google Apps" product to
>>>> the browser.
>>>>
>>>> As Alumnus from Rutgers, I would be thrilled if you all can take
>>>> advantage of these.  I know Sakai is open source, but personally am totally
>>>> unaware of licensing issues for this stuff.
>>>>
>>>>
>>>> All the best,
>>>>
>>>> Raymond Naseef (Ray)
>>>> raymond.naseef at gmail.com
>>>>
>>>>
>>>>
>>>> On Tue, Jun 18, 2013 at 12:07 PM, John Bush <john.bush at rsmart.com>wrote:
>>>>
>>>>> There is a integration of gdocs with resources we did a few years back
>>>>> here:
>>>>> https://source.sakaiproject.org/contrib/rsmart/google-content
>>>>>
>>>>> It will let you link gdocs into resources, and then use in sakai where
>>>>> ever you want.  Anyone else get read only view of it, the author can
>>>>> select edit to get back to the gdocs interface.  There is nothing with
>>>>> calendar done.
>>>>>
>>>>> I believe michigan is working on an lti integration that links a gdocs
>>>>> folder in as a sakai tool.  But I'm not sure how that integrates with
>>>>> other components of sakai if at all.
>>>>>
>>>>>
>>>>> John Bush
>>>>> 602-490-0470
>>>>>
>>>>> ** This message is neither private nor confidential in fact the US
>>>>> government is storing it in a warehouse located in Utah for future
>>>>> data mining use cases should they arise. **
>>>>>
>>>>>
>>>>> On Tue, Jun 18, 2013 at 8:45 AM, William Karavites
>>>>> <willkara at oit.rutgers.edu> wrote:
>>>>> > Hello,
>>>>> >
>>>>> > We are again looking into a Google Docs/Calendar Integration for
>>>>> Sakai and I
>>>>> > was wondering if anyone had any working integrations. We have a
>>>>> Google Apps
>>>>> > license and have already been using Gmail at our University for some
>>>>> time
>>>>> > now.
>>>>> >
>>>>> >
>>>>> > Any help or direction would be greatly appreciated.
>>>>> >
>>>>> > Thank you,
>>>>> > William Karavites
>>>>> >
>>>>> >
>>>>> > ------------------------------------
>>>>> > William Karavites
>>>>> > Application Programmer
>>>>> > OIT/OIRT- Rutgers University
>>>>> > Office: 732-445-8726
>>>>> > Cell: 732-822-9405
>>>>> > willkara at rutgers.edu
>>>>> > ------------------------------------
>>>>> >
>>>>> >
>>>>> > _______________________________________________
>>>>> > sakai-dev mailing list
>>>>> > sakai-dev at collab.sakaiproject.org
>>>>> > http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>> >
>>>>> > TO UNSUBSCRIBE: send email to
>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org
>>>>> > with a subject of "unsubscribe"
>>>>> _______________________________________________
>>>>> sakai-dev mailing list
>>>>> sakai-dev at collab.sakaiproject.org
>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>
>>>>> TO UNSUBSCRIBE: send email to
>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>> "unsubscribe"
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> sakai-dev mailing list
>>>> sakai-dev at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>
>>>> TO UNSUBSCRIBE: send email to
>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>> "unsubscribe"
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130806/2ad25201/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 64354 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130806/2ad25201/attachment.png 


More information about the sakai-dev mailing list