public interface AuthenticationService
Modifier and Type | Method and Description |
---|---|
Future<rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper> |
changeCredentials(rst.domotic.authentication.LoginCredentialsChangeType.LoginCredentialsChange loginCredentialsChange)
Changes the credentials for a given user.
|
Future<Boolean> |
hasUser(String userId) |
Future<Boolean> |
isAdmin(String userId)
Returns whether a given user has admin rights or not.
|
Future<rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper> |
register(rst.domotic.authentication.LoginCredentialsChangeType.LoginCredentialsChange loginCredentialsChange)
Registers a client or user.
|
Future<rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper> |
removeUser(rst.domotic.authentication.LoginCredentialsChangeType.LoginCredentialsChange loginCredentialsChange)
Removes a user or client.
|
Future<rst.domotic.authentication.TicketSessionKeyWrapperType.TicketSessionKeyWrapper> |
requestClientServerTicket(rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper ticketAuthenticatorWrapper)
Request a ClientServerTicket from the AuthenticatorService.
|
Future<rst.domotic.authentication.AuthenticatedValueType.AuthenticatedValue> |
requestServiceServerSecretKey(rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper ticketAuthenticatorWrapper)
Validates the client server ticket and returns the service server secret key encrypted
with the session key.
|
Future<rst.domotic.authentication.TicketSessionKeyWrapperType.TicketSessionKeyWrapper> |
requestTicketGrantingTicket(String clientId)
Request a TicketGrantingTicket from the AuthenticatorService.
|
Future<rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper> |
setAdministrator(rst.domotic.authentication.LoginCredentialsChangeType.LoginCredentialsChange loginCredentialsChange)
Appoints a normal user to an administrator.
|
Future<rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper> |
validateClientServerTicket(rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper ticketAuthenticatorWrapper)
Validate a ClientServierTicket.
|
Future<rst.domotic.authentication.TicketSessionKeyWrapperType.TicketSessionKeyWrapper> requestTicketGrantingTicket(String clientId) throws org.openbase.jul.exception.NotAvailableException, org.openbase.jul.exception.CouldNotPerformException
clientId
- the id of the client whose password is used for the
encryption of the session keyorg.openbase.jul.exception.NotAvailableException
- If the clientId could not be found.org.openbase.jul.exception.CouldNotPerformException
- In the case of an internal server error or if the remote call fails.Future<rst.domotic.authentication.TicketSessionKeyWrapperType.TicketSessionKeyWrapper> requestClientServerTicket(rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper ticketAuthenticatorWrapper) throws org.openbase.jul.exception.RejectedException, org.openbase.jul.exception.CouldNotPerformException
ticketAuthenticatorWrapper
- a wrapper containing the authenticator
encrypted with the TicketGrantingService session key and the unchanged
TicketGrantingTicketorg.openbase.jul.exception.RejectedException
- If timestamp in Authenticator does not fit to time period in TGT,
if clientID in Authenticator does not match clientID in TGT or, if the decryption of the
Authenticator or TGT fails, probably because the wrong keys were used.org.openbase.jul.exception.CouldNotPerformException
- In the case of an internal server error or if the remote call fails.Future<rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper> validateClientServerTicket(rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper ticketAuthenticatorWrapper) throws org.openbase.jul.exception.RejectedException, org.openbase.jul.exception.CouldNotPerformException
ticketAuthenticatorWrapper
- a wrapper containing the authenticator
encrypted with the session key and the unchanged ClientServerTicketorg.openbase.jul.exception.RejectedException
- If timestamp in Authenticator does not fit to time period in TGT,
if clientID in Authenticator does not match clientID in TGT or, if the decryption of the
Authenticator or CST fails, probably because the wrong keys were used.org.openbase.jul.exception.CouldNotPerformException
- In the case of an internal server error or if the remote call fails.Future<rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper> changeCredentials(rst.domotic.authentication.LoginCredentialsChangeType.LoginCredentialsChange loginCredentialsChange) throws org.openbase.jul.exception.CouldNotPerformException, org.openbase.jul.exception.RejectedException, org.openbase.jul.exception.PermissionDeniedException
loginCredentialsChange
- Wrapper containing the user's ID, new and old password,
and a TicketAuthenticatorWrapper to authenticate the user.org.openbase.jul.exception.RejectedException
- If the password change fails (invalid ticket, user has no permission, old password doesn't match).org.openbase.jul.exception.PermissionDeniedException
- If the user has no permission to change this password.org.openbase.jul.exception.CouldNotPerformException
Future<rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper> register(rst.domotic.authentication.LoginCredentialsChangeType.LoginCredentialsChange loginCredentialsChange) throws org.openbase.jul.exception.CouldNotPerformException, org.openbase.jul.exception.RejectedException, org.openbase.jul.exception.PermissionDeniedException
loginCredentialsChange
- Wrapper containing the user's ID, password or public key, isAdmin flag,
and a TicketAuthenticatorWrapper to authenticate the user.org.openbase.jul.exception.RejectedException
- If the password change fails (invalid ticket, user has no permission, old password doesn't match)
or if the decryption fails, because the wrong keys were used.org.openbase.jul.exception.PermissionDeniedException
- If the user has no permission to change this password.org.openbase.jul.exception.CouldNotPerformException
Future<rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper> removeUser(rst.domotic.authentication.LoginCredentialsChangeType.LoginCredentialsChange loginCredentialsChange) throws org.openbase.jul.exception.CouldNotPerformException, org.openbase.jul.exception.RejectedException, org.openbase.jul.exception.PermissionDeniedException
loginCredentialsChange
- change of credentials (id of user to remove)org.openbase.jul.exception.RejectedException
- If the password change fails (invalid ticket, user has no permission, old password doesn't match)
or if the decryption fails, because the wrong keys were used.org.openbase.jul.exception.PermissionDeniedException
- If the user has no permission to change this password.org.openbase.jul.exception.CouldNotPerformException
Future<rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper> setAdministrator(rst.domotic.authentication.LoginCredentialsChangeType.LoginCredentialsChange loginCredentialsChange) throws org.openbase.jul.exception.CouldNotPerformException, org.openbase.jul.exception.RejectedException, org.openbase.jul.exception.PermissionDeniedException
loginCredentialsChange
- Wrapper containing the user's ID, password or public key, isAdmin flag,
and a TicketAuthenticatorWrapper to authenticate the user.org.openbase.jul.exception.RejectedException
- If the password change fails (invalid ticket, user has no permission)
or if the decryption fails, because the wrong keys were used.org.openbase.jul.exception.PermissionDeniedException
- If the user has no permission to change this password.org.openbase.jul.exception.CouldNotPerformException
Future<rst.domotic.authentication.AuthenticatedValueType.AuthenticatedValue> requestServiceServerSecretKey(rst.domotic.authentication.TicketAuthenticatorWrapperType.TicketAuthenticatorWrapper ticketAuthenticatorWrapper) throws org.openbase.jul.exception.CouldNotPerformException
ticketAuthenticatorWrapper
- a wrapper containing the authenticator
encrypted with the session key and the unchanged ClientServerTicketorg.openbase.jul.exception.CouldNotPerformException
- if the validation of the client server ticket fails or the logged in client is not the service serverFuture<Boolean> isAdmin(String userId) throws org.openbase.jul.exception.NotAvailableException, org.openbase.jul.exception.CouldNotPerformException
userId
- ID of the user to check for.org.openbase.jul.exception.NotAvailableException
- If the user could not be found.org.openbase.jul.exception.CouldNotPerformException
Copyright © 2017–2018 openbase.org. All rights reserved.