Package com.nimbusds.oauth2.sdk.client
Class ClientUpdateRequest
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.AbstractRequest
-
- com.nimbusds.oauth2.sdk.ProtectedResourceRequest
-
- com.nimbusds.oauth2.sdk.client.ClientUpdateRequest
-
- Direct Known Subclasses:
OIDCClientUpdateRequest
@Immutable public class ClientUpdateRequest extends ProtectedResourceRequest
Client registration request.Example HTTP request:
PUT /register/s6BhdRkqt3 HTTP/1.1 Accept: application/json Host: server.example.com Authorization: Bearer reg-23410913-abewfq.123483 { "client_id" :"s6BhdRkqt3", "client_secret" : "cf136dc3c1fc93f31185e5885805d", "redirect_uris" : [ "https://client.example.org/callback", "https://client.example.org/alt" ], "scope" : "read write dolphin", "grant_types" : [ "authorization_code", "refresh_token" ] "token_endpoint_auth_method" : "client_secret_basic", "jwks_uri" : "https://client.example.org/my_public_keys.jwks" "client_name" : "My New Example", "client_name#fr" : "Mon Nouvel Exemple", "logo_uri" : "https://client.example.org/newlogo.png" "logo_uri#fr" : "https://client.example.org/fr/newlogo.png" }Related specifications:
- OAuth 2.0 Dynamic Client Registration Management Protocol (RFC 7592), section 2.2.
- OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591), section 2.
-
-
Constructor Summary
Constructors Constructor Description ClientUpdateRequest(URI uri, ClientID id, BearerAccessToken accessToken, ClientMetadata metadata, Secret secret)Creates a new client update request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientIDgetClientID()Gets the client ID.ClientMetadatagetClientMetadata()Gets the associated client metadata.SecretgetClientSecret()Gets the client secret.static ClientUpdateRequestparse(HTTPRequest httpRequest)Parses a client update request from the specified HTTP PUT request.HTTPRequesttoHTTPRequest()Returns the matching HTTP request.-
Methods inherited from class com.nimbusds.oauth2.sdk.ProtectedResourceRequest
getAccessToken
-
Methods inherited from class com.nimbusds.oauth2.sdk.AbstractRequest
getEndpointURI
-
-
-
-
Constructor Detail
-
ClientUpdateRequest
public ClientUpdateRequest(URI uri, ClientID id, BearerAccessToken accessToken, ClientMetadata metadata, Secret secret)
Creates a new client update request.- Parameters:
uri- The URI of the client update endpoint. May benullif thetoHTTPRequest()method will not be used.id- The client ID. Must not benull.accessToken- The client registration access token. Must not benull.metadata- The client metadata. Must not benulland must specify one or more redirection URIs.secret- The optional client secret,nullif not specified.
-
-
Method Detail
-
getClientID
public ClientID getClientID()
Gets the client ID. Corresponds to theclient_idclient registration parameter.- Returns:
- The client ID,
nullif not specified.
-
getClientMetadata
public ClientMetadata getClientMetadata()
Gets the associated client metadata.- Returns:
- The client metadata.
-
getClientSecret
public Secret getClientSecret()
Gets the client secret. Corresponds to theclient_secretregistration parameters.- Returns:
- The client secret,
nullif not specified.
-
toHTTPRequest
public HTTPRequest toHTTPRequest()
Description copied from interface:RequestReturns the matching HTTP request.- Returns:
- The HTTP request.
-
parse
public static ClientUpdateRequest parse(HTTPRequest httpRequest) throws ParseException
Parses a client update request from the specified HTTP PUT request.- Parameters:
httpRequest- The HTTP request. Must not benull.- Returns:
- The client update request.
- Throws:
ParseException- If the HTTP request couldn't be parsed to a client update request.
-
-