Package com.nimbusds.oauth2.sdk.device
Class DeviceAuthorizationRequest.Builder
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.device.DeviceAuthorizationRequest.Builder
-
- Enclosing class:
- DeviceAuthorizationRequest
public static class DeviceAuthorizationRequest.Builder extends Object
Builder for constructing authorisation requests.
-
-
Constructor Summary
Constructors Constructor Description Builder(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.Builder(ClientID clientID)
Creates a new devize authorization request builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeviceAuthorizationRequest
build()
Builds a new device authorization request.DeviceAuthorizationRequest.Builder
customParameter(String name, String... values)
Sets a custom parameter.DeviceAuthorizationRequest.Builder
endpointURI(URI uri)
Sets the URI of the endpoint (HTTP or HTTPS) for which the request is intended.DeviceAuthorizationRequest.Builder
scope(Scope scope)
Sets the scope.
-
-
-
Constructor Detail
-
Builder
public Builder(ClientID clientID)
Creates a new devize authorization request builder.- Parameters:
clientID
- The client identifier. Corresponds to theclient_id
parameter. Must not benull
.
-
Builder
public Builder(ClientAuthentication clientAuth)
Creates a new device authorization request builder for an authenticated request.- Parameters:
clientAuth
- The client authentication. Must not benull
.
-
Builder
public Builder(DeviceAuthorizationRequest request)
Creates a new device authorization request builder from the specified request.- Parameters:
request
- The device authorization request. Must not benull
.
-
-
Method Detail
-
scope
public DeviceAuthorizationRequest.Builder scope(Scope scope)
Sets the scope. Corresponds to the optionalscope
parameter.- Parameters:
scope
- The scope,null
if not specified.- Returns:
- This builder.
-
customParameter
public DeviceAuthorizationRequest.Builder customParameter(String name, String... values)
Sets a custom parameter.- Parameters:
name
- The parameter name. Must not benull
.values
- The parameter values,null
if not specified.- Returns:
- This builder.
-
endpointURI
public DeviceAuthorizationRequest.Builder endpointURI(URI uri)
Sets the URI of the endpoint (HTTP or HTTPS) for which the request is intended.- Parameters:
uri
- The endpoint URI,null
if not specified.- Returns:
- This builder.
-
build
public DeviceAuthorizationRequest build()
Builds a new device authorization request.- Returns:
- The device authorization request.
-
-