Interface OAuth2ClientService
-
- All Known Implementing Classes:
OAuth2ClientServiceImpl
public interface OAuth2ClientService
- Since:
- 9.2
-
-
Field Summary
Fields Modifier and Type Field Description static String
OAUTH2CLIENT_DIRECTORY_NAME
static String
OAUTH2CLIENT_SCHEMA
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OAuth2Client
create(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.OAuth2Client
getClient(String clientId)
Gets the oAuth2 client with the given client id.List<OAuth2Client>
getClients()
Gets all the oAuth2 clients.boolean
hasClient(String clientId)
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.OAuth2Client
update(String clientId, OAuth2Client oAuth2Client, NuxeoPrincipal principal)
Updates an exiting oAuth2 client as the given principal.
-
-
-
Field Detail
-
OAUTH2CLIENT_DIRECTORY_NAME
static final String OAUTH2CLIENT_DIRECTORY_NAME
- See Also:
- Constant Field Values
-
OAUTH2CLIENT_SCHEMA
static final String OAUTH2CLIENT_SCHEMA
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasClient
boolean hasClient(String clientId)
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
boolean isValidClient(String clientId, String clientSecret)
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
OAuth2Client getClient(String clientId)
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
OAuth2Client create(OAuth2Client oAuth2Client, NuxeoPrincipal principal)
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
OAuth2Client update(String clientId, OAuth2Client oAuth2Client, NuxeoPrincipal principal)
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
void delete(String clientId, NuxeoPrincipal principal)
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
-
-