@HTTPService(name="twitter") public class TwitterUserService extends java.lang.Object
Constructor and Description |
---|
TwitterUserService() |
Modifier and Type | Method and Description |
---|---|
Response |
authorize(AuthenticationParameter authenticatedUser,
StringParameter redirectUri)
This method can be used to grant the service access to the authenticated user's Twitter account.
|
Response |
login(AuthenticationParameter authenticatedUser)
This method can be used to authenticate the user using Twitter credentials.
|
Response |
oAuthAuthorizeCallback(StringParameter token,
StringParameter verifier)
This method is called by Twitter after user has either denied or granted the service permission to his/her Twitter account, and is not meant to be used directly by the end-users.
|
Response |
oAuthLoginCallback(AuthenticationParameter authenticatedUser,
StringParameter token,
StringParameter verifier)
This method is called by Twitter after user has either denied or granted the service permission to his/her Twitter account, and is not meant to be used directly by the end-users.
|
Response |
oAuthRegisterCallback(StringParameter token,
StringParameter verifier)
This method is called by Twitter after user has either denied or granted the service permission to his/her Twitter account, and is not meant to be used directly by the end-users.
|
Response |
register()
This method can be used to register a new user using a Twitter account.
|
Response |
unauthorize(AuthenticationParameter authenticatedUser)
This method allows a user to revoke the previously given authorization permissions.
|
public TwitterUserService()
@HTTPServiceMethod(name="oAuthLoginCallback") public Response oAuthLoginCallback(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="oauth_token") StringParameter token, @HTTPMethodParameter(name="oauth_verifier") StringParameter verifier)
authenticatedUser
- token
- OAuth token as provided by Twitter.verifier
- OAuth verifier generated by Twitter.@HTTPServiceMethod(name="oAuthAuthorizeCallback") public Response oAuthAuthorizeCallback(@HTTPMethodParameter(name="oauth_token") StringParameter token, @HTTPMethodParameter(name="oauth_verifier") StringParameter verifier)
token
- OAuth token as provided by Twitter.verifier
- OAuth verifier generated by Twitter.@HTTPServiceMethod(name="oAuthRegisterCallback") public Response oAuthRegisterCallback(@HTTPMethodParameter(name="oauth_token") StringParameter token, @HTTPMethodParameter(name="oauth_verifier") StringParameter verifier)
token
- OAuth token as provided by Twitter.verifier
- OAuth verifier generated by Twitter.@HTTPServiceMethod(name="login") public Response login(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser)
authenticatedUser
- @HTTPServiceMethod(name="register") public Response register()
@HTTPServiceMethod(name="authorize") public Response authorize(@HTTPAuthenticationParameter AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="redirect_uri",required=false) StringParameter redirectUri)
authenticatedUser
- redirectUri
- The final target, where the user should be redirected to after successful authorization. If not given, a default status message will be shown.@HTTPServiceMethod(name="unauthorize") public Response unauthorize(@HTTPAuthenticationParameter AuthenticationParameter authenticatedUser)
authenticatedUser
- Copyright © 2015 Tampere University of Technology, Pori Department.