Package com.nimbusds.oauth2.sdk.device
Class DeviceAuthorizationRequest.Builder
java.lang.Object
com.nimbusds.oauth2.sdk.device.DeviceAuthorizationRequest.Builder
- Enclosing class:
- DeviceAuthorizationRequest
Builder for constructing authorisation requests.
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(ClientAuthentication clientAuth) Creates a new device authorization request builder for an authenticated request.Builder
(DeviceAuthorizationRequest request) Creates a new device authorization request builder from the specified request.Creates a new device authorization request builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a new device authorization request.customParameter
(String name, String... values) Sets a custom parameter.endpointURI
(URI endpoint) Sets the URI of the device authorisation endpoint.Sets the scope.
-
Constructor Details
-
Builder
Creates a new device authorization request builder.- Parameters:
clientID
- The client identifier. Corresponds to theclient_id
parameter. Must not benull
.
-
Builder
Creates a new device authorization request builder for an authenticated request.- Parameters:
clientAuth
- The client authentication. Must not benull
.
-
Builder
Creates a new device authorization request builder from the specified request.- Parameters:
request
- The device authorization request. Must not benull
.
-
-
Method Details
-
scope
Sets the scope. Corresponds to the optionalscope
parameter.- Parameters:
scope
- The scope,null
if not specified.- Returns:
- This builder.
-
customParameter
Sets a custom parameter.- Parameters:
name
- The parameter name. Must not benull
.values
- The parameter values,null
if not specified.- Returns:
- This builder.
-
endpointURI
Sets the URI of the device authorisation endpoint.- Parameters:
endpoint
- The URI of the device authorisation endpoint. May benull
if the request is not going to be serialised.- Returns:
- This builder.
-
build
Builds a new device authorization request.- Returns:
- The device authorization request.
-