How to change OAuth setting (path)? to authenticate


#1

Hi there, I’m japanese. so poor at English. sorry

anyway,

I try to develop I’m working on web application with twitter.

and I wonder,

How to change setting values of OAuth setting??

I want to change OAuth path.
like this.
https://api.twitter.com/oauth/authorize --> https://api.twitter.com/oauth/authenticate

because of the user session problem.

What i gonna do?

How can I change the OAuth path ?

I know like this.
*authorize path : sign in user and session is hold on~ only user can sign out.
*authenticate path: sign in user and session is auto sign out.

it that right?

This is my Twitter API app info.

OAuth settings

Your application’s OAuth settings. Keep the “Consumer secret” a secret. This key should never be human-readable in your application.

Access level Read, write, and direct messages
About the application permission model
Consumer key xxxxxxxxxxxxxxxdxxxx
Consumer secret xxxxxxxxxxxxxxxxxxxxxxxxxxxxxWxxxxx
Request token URL https://api.twitter.com/oauth/request_token
Authorize URL https://api.twitter.com/oauth/authorize


#2

You have to configure your OAuth client to use https://api.twitter.com/oauth/authenticate for the authorize endpoint. OAuth client libraries will allow you to configure this value.

The value displayed on dev.twitter.com is just a reminder. You are not forced to use what is displayed there.


#3

I’m using scribe libraries on java for web application.
So you mean, The path can be changed by only in the scribe library?
is that right? but I cant’t find the path URL in that library.
this library.
https://github.com/fernandezpablo85/scribe-java/tree/master/src/main/java/org/scribe/oauth
there is nothing like a URL
then, how can we configure the value?
please help me anybody.


#4

The URL is hardcoded in this file:
https://github.com/fernandezpablo85/scribe-java/blob/master/src/main/java/org/scribe/builder/api/TwitterApi.java


#5

Both URLs are hardcoded in that file, actually. You can use either one, you just need to specify the right API class.

To use the “authenticate” endpoint:

OAuthService service = new ServiceBuilder()
.provider(TwitterApi.Authenticate.class)
.apiKey(appConfig.AppId())
.apiSecret(appConfig.AppSecret())
.callback(appConfig.ProcessRegistrationUri().toString())
.build();

TwitterApi.Authorize.class is functionally equivalent to TwitterApi.class, I believe, since “authorize” is the default endpoint.


#6

fasfdasafaf


#7

Purchase high quality GATE exam books and practice materials at upto 70% off from Disha Publication. For details, visit http://dishapublication.com/gate-exams-books.html.