Interface OAuth2ClientService
- All Known Implementing Classes:
OAuth2ClientServiceImpl
public interface OAuth2ClientService
- Since:
- 9.2
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(OAuth2Client oAuth2Client, NuxeoPrincipal principal) Registers a new oAuth2 client as the given principal.void
delete
(String clientId, NuxeoPrincipal principal) Deletes an oAuth2 client as the given principal.Gets the oAuth2 client with the given client id.Gets all the oAuth2 clients.boolean
Checks if an oAuth2 client with the given client id exists.boolean
isValidClient
(String clientId, String clientSecret) Checks if the oAuth2 client with the given client id is valid regarding the given client secret.update
(String clientId, OAuth2Client oAuth2Client, NuxeoPrincipal principal) Updates an exiting oAuth2 client as the given principal.
-
Field Details
-
OAUTH2CLIENT_DIRECTORY_NAME
- See Also:
-
OAUTH2CLIENT_SCHEMA
- See Also:
-
-
Method Details
-
hasClient
Checks if an oAuth2 client with the given client id exists.Done as a privileged user.
- Parameters:
clientId
- the client id of the oAuth2 client whose existence to check- Returns:
true
if an oAuth2 client with the given client id exists,false
otherwise
-
isValidClient
Checks if the oAuth2 client with the given client id is valid regarding the given client secret.Done as a privileged user.
- Parameters:
clientId
- the client id of the oAuth2 client to validateclientSecret
- the client secret used for validation- Returns:
true
if the oAuth2 client with the given client id is valid regarding the given client secret,false
otherwise
-
getClient
Gets the oAuth2 client with the given client id.Done as a privileged user.
- Parameters:
clientId
- the client id of the oAuth2 client to get- Returns:
- the oAuth2 client with the given client id if it exists,
null
otherwise
-
getClients
List<OAuth2Client> getClients()Gets all the oAuth2 clients.Done as a privileged user.
- Returns:
- the oAuth2 clients
- Since:
- 10.2
-
create
Registers a new oAuth2 client as the given principal.- Parameters:
oAuth2Client
- theOAuth2Client
to registerprincipal
- the current user- Returns:
- the newly registered client
- Throws:
NuxeoException
- with 403 status code if the given principal doesn't have access to the oAuth2 clients- Since:
- 11.1
-
update
Updates an exiting oAuth2 client as the given principal.- Parameters:
clientId
- the client id of oAuth2Client to updateoAuth2Client
- the newOAuth2Client
dataprincipal
- the current user- Returns:
- the updated oAuth2Client
- Throws:
NuxeoException
- with 403 status code if the given principal doesn't have access to the oAuth2 clients- Since:
- 11.1
-
delete
Deletes an oAuth2 client as the given principal.- Parameters:
clientId
- the client id of the oAuth2Client to deleteprincipal
- the current user- Throws:
NuxeoException
- with 403 status code if the given principal doesn't have access to the oAuth2 clients- Since:
- 11.1
-