-
- All Implemented Interfaces:
-
com.auth0.android.request.Request
public final class ProfileRequest implements Request<Authentication, AuthenticationException>
Request to fetch a profile after a successful authentication with Auth0 Authentication API
-
-
Constructor Summary
Constructors Constructor Description ProfileRequest(AuthenticationRequest authenticationRequest, Request<UserProfile, AuthenticationException> userInfoRequest)
-
Method Summary
Modifier and Type Method Description ProfileRequest
addParameters(Map<String, String> parameters)
Adds additional parameters for the login request ProfileRequest
addParameter(String name, String value)
Add parameter to the request with a given name ProfileRequest
addHeader(String name, String value)
Adds a header to the request, e.g. final ProfileRequest
setScope(String scope)
Set the scope used to authenticate the user final ProfileRequest
setConnection(String connection)
Set the connection used to authenticate Unit
start(Callback<Authentication, AuthenticationException> callback)
Starts the log in request and then fetches the user's profile Authentication
execute()
Logs in the user with Auth0 and fetches it's profile. Authentication
await()
Logs in the user with Auth0 and fetches it's profile inside a Coroutine. -
-
Constructor Detail
-
ProfileRequest
ProfileRequest(AuthenticationRequest authenticationRequest, Request<UserProfile, AuthenticationException> userInfoRequest)
-
-
Method Detail
-
addParameters
ProfileRequest addParameters(Map<String, String> parameters)
Adds additional parameters for the login request
- Parameters:
parameters
- as a non-null dictionary
-
addParameter
ProfileRequest addParameter(String name, String value)
Add parameter to the request with a given name
- Parameters:
name
- of the parametervalue
- of the parameter
-
addHeader
ProfileRequest addHeader(String name, String value)
Adds a header to the request, e.g. "Authorization"
- Parameters:
name
- of the headervalue
- of the header
-
setScope
final ProfileRequest setScope(String scope)
Set the scope used to authenticate the user
- Parameters:
scope
- value
-
setConnection
final ProfileRequest setConnection(String connection)
Set the connection used to authenticate
- Parameters:
connection
- name
-
start
Unit start(Callback<Authentication, AuthenticationException> callback)
Starts the log in request and then fetches the user's profile
- Parameters:
callback
- called on either success or failure
-
execute
Authentication execute()
Logs in the user with Auth0 and fetches it's profile.
-
await
Authentication await()
Logs in the user with Auth0 and fetches it's profile inside a Coroutine. This is a Coroutine that is exposed only for Kotlin.
-
-
-
-