Changeset 923


Ignore:
Timestamp:
Oct 5, 2010, 11:10:38 AM (6 years ago)
Author:
tabma
Message:
  • Sandbox update to OAuth
Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/SandboxController.groovy

    r919 r923  
    5353        }
    5454
    55         def oauth = {
    56             def key = session.oauthToken.key
     55        def oauth = {           
    5756            def secret = session.oauthToken.secret
    58             def response = oauthService.accessResource(url: 'http://www.myexperiment.org/whoami.xml', consumer: 'myExperiment',
    59             token:[key: key, secret: secret], method: 'POST')
     57            def response = oauthService.accessResource(url: 'http://www.myexperiment.org/whoami.xml', 'myExperiment',
     58                           [key: session.oauthToken.key, secret: session.oauthToken.secret], 'GET')
    6059            render ("Calling whoami from myExperiment [key:" + key + ", secret:"+secret+"]")
    6160            render ("Response: " + response)
  • trunk/grails-app/views/home/index.gsp

    r914 r923  
    1919
    2020    <g:oauthLink consumer='myExperiment'
    21              returnTo="[controller: 'Home', action: 'index']">Authorize</g:oauthLink>
     21             returnTo="[controller: 'home', action: 'index']">Authorize</g:oauthLink>
    2222
    2323    <g:hasOauthError>
    2424     <div class="errors">
    2525           <g:renderOauthError />
    26      </div>
    27      
     26     </div>     
    2827    </g:hasOauthError>
    2928  </body>
Note: See TracChangeset for help on using the changeset viewer.