Package com.auth0.net
Class TokenRequest
- All Implemented Interfaces:
AuthRequest
,Request<TokenHolder>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected okhttp3.Request
protected Auth0Exception
createResponseException
(okhttp3.Response response) Responsible for parsing an unsuccessful request (status code other than 200) and generating a developer-friendly exception with the error details.protected String
Getter for the content-type header value to use on this requestprotected TokenHolder
parseResponse
(okhttp3.Response response) setAudience
(String audience) Setter for the audience value to requestSetter for the realm value to requestSetter for the scope value to requestMethods inherited from class com.auth0.net.CustomRequest
addHeader, addParameter, createRequestBody, readResponseBody, setBody
Methods inherited from class com.auth0.net.BaseRequest
execute, executeAsync
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.auth0.net.Request
execute, executeAsync
-
Constructor Details
-
TokenRequest
-
-
Method Details
-
setRealm
Description copied from interface:AuthRequest
Setter for the realm value to request- Specified by:
setRealm
in interfaceAuthRequest
- Parameters:
realm
- the realm to request- Returns:
- this request instance.
-
setAudience
Description copied from interface:AuthRequest
Setter for the audience value to request- Specified by:
setAudience
in interfaceAuthRequest
- Parameters:
audience
- the audience to request- Returns:
- this request instance.
-
setScope
Description copied from interface:AuthRequest
Setter for the scope value to request- Specified by:
setScope
in interfaceAuthRequest
- Parameters:
scope
- the scope to request- Returns:
- this request instance.
-
createRequest
- Specified by:
createRequest
in classBaseRequest<T>
- Throws:
Auth0Exception
-
parseResponse
- Specified by:
parseResponse
in classBaseRequest<T>
- Throws:
Auth0Exception
-
getContentType
Getter for the content-type header value to use on this request- Returns:
- the content-type
-
createResponseException
Responsible for parsing an unsuccessful request (status code other than 200) and generating a developer-friendly exception with the error details.- Parameters:
response
- the unsuccessful response, as received. If its body is accessed, the buffer must be closed.- Returns:
- the exception with the error details.
-