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_idparameter. 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 optionalscopeparameter.- Parameters:
scope- The scope,nullif not specified.- Returns:
- This builder.
-
customParameter
Sets a custom parameter.- Parameters:
name- The parameter name. Must not benull.values- The parameter values,nullif not specified.- Returns:
- This builder.
-
endpointURI
Sets the URI of the device authorisation endpoint.- Parameters:
endpoint- The URI of the device authorisation endpoint. May benullif the request is not going to be serialised.- Returns:
- This builder.
-
build
Builds a new device authorization request.- Returns:
- The device authorization request.
-