@Immutable @LevelUpApi(contract=ENTERPRISE) public final class AccessTokenRequestFactory extends AbstractRequestFactory
AccessToken
s.Constructor and Description |
---|
AccessTokenRequestFactory(Context context)
Constructor.
|
AccessTokenRequestFactory(Context context,
AccessTokenRetriever retriever)
Constructor with access token retriever.
|
Modifier and Type | Method and Description |
---|---|
AbstractRequest |
buildDowngradeRequest(Collection<Permission> permissions)
Build a request for a downgraded scoped access token.
|
AbstractRequest |
buildDowngradeRequest(Permission... permissions)
Build a request for a downgraded scoped access token.
|
AbstractRequest |
buildDowngradeRequest(String... permissionKeyNames)
Build a request for a downgraded scoped access token.
|
AbstractRequest |
buildFacebookLoginRequest(String facebookAccessToken)
Build a request to perform a login with Facebook.
|
AbstractRequest |
buildLoginRequest(String email,
String password)
Build a request to perform a login with email/password.
|
getAccessTokenRetriever, getContext
public AccessTokenRequestFactory(Context context)
context
- the Application context.public AccessTokenRequestFactory(Context context, AccessTokenRetriever retriever)
context
- the Application context.retriever
- the AccessTokenRetriever.@LevelUpApi(contract=ENTERPRISE) public AbstractRequest buildLoginRequest(String email, String password)
email
- the user's email.password
- the user's password.AbstractRequest
representing a login request.@LevelUpApi(contract=INTERNAL) public AbstractRequest buildFacebookLoginRequest(String facebookAccessToken)
facebookAccessToken
- the user's Facebook access token.AbstractRequest
representing a login request.@AccessTokenRequired @LevelUpApi(contract=ENTERPRISE) public AbstractRequest buildDowngradeRequest(Collection<Permission> permissions)
permissions
- The permissions for the access token you want.AbstractRequest
to retrieve an access token scoped to the provided
permissions.@AccessTokenRequired @LevelUpApi(contract=ENTERPRISE) public AbstractRequest buildDowngradeRequest(String... permissionKeyNames)
permissionKeyNames
- The key names for permissions on the access token you want.AbstractRequest
to retrieve an access token scoped to the provided
permissions.@AccessTokenRequired @LevelUpApi(contract=ENTERPRISE) public AbstractRequest buildDowngradeRequest(Permission... permissions)
permissions
- The permissions for the access token you want.AbstractRequest
to retrieve an access token scoped to the provided
permissions.