Hello,

I am trying to use OAuthSwift to get authenticated to my app running using 
rest framework.

I am following instruction from 
https://django-oauth-toolkit.readthedocs.org/en/0.3.2/tutorial/rest_framework_integration.html
.

Can you please indicate what URL I should be using to get myself validated. 
The api takes authorizeUrl, accessTokenUrl, and callback url 

  func doOAuthScreener(){

        let oauthswift = OAuth2Swift(

            //
https://django-oauth-toolkit.readthedocs.org/en/latest/rest-framework/getting_started.html

            consumerKey:    Screener["consumerKey"]!,

            consumerSecret: Screener["consumerSecret"]!,

            authorizeUrl:   *HERE*, 

            accessTokenUrl: *HERE*, // This seem to be 
http://localhost:8000/o/token/

            responseType:   "code"

        )

        

        

        let state: String = generateStateWithLength(20) as String

        

        

        oauthswift.authorizeWithCallbackURL( NSURL(string: "*HERE*")!, 
scope: "user,repo", state: state, success: {

            credential, response, parameters in

            self.showAlertView("Screener", 
message: "oauth_token:\(credential.oauth_token)")

            }, failure: {(error:NSError!) -> Void in

                println(error.localizedDescription)

        })    


    }


Thanks,

Shekar

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3b1ea260-5c8b-49a5-a22d-74de3fb8f3f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to