Package org.saidone.restless.sdk
Class GrpcAuthenticationApi
java.lang.Object
org.saidone.restless.sdk.GrpcAuthenticationApi
- All Implemented Interfaces:
org.alfresco.authentication.handler.AuthenticationApi,org.alfresco.authentication.handler.AuthenticationApiClient
public final class GrpcAuthenticationApi
extends Object
implements org.alfresco.authentication.handler.AuthenticationApiClient
Alfresco SDK ticket operations backed by the repository's gRPC authentication service.
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcAuthenticationApi(AuthenticationServiceClient authentication, TicketProvider tickets) Creates the ticket adapter with default Feign error mapping. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<org.alfresco.authentication.model.TicketEntry> createTicket(org.alfresco.authentication.model.TicketBody credentials) Exchanges the supplied credentials for a repository ticket.org.springframework.http.ResponseEntity<Void> Revokes the caller's ticket in Alfresco and notifies the provider to discard that value.org.springframework.http.ResponseEntity<org.alfresco.authentication.model.ValidTicketEntry> Validates the ticket supplied by the caller's provider, without renewing it.
-
Constructor Details
-
GrpcAuthenticationApi
Creates the ticket adapter with default Feign error mapping.- Parameters:
authentication- shared gRPC authentication clienttickets- current caller ticket provider; may be null when only creating tickets
-
-
Method Details
-
createTicket
public org.springframework.http.ResponseEntity<org.alfresco.authentication.model.TicketEntry> createTicket(org.alfresco.authentication.model.TicketBody credentials) Exchanges the supplied credentials for a repository ticket. Other clients keep their own ticket providers.- Specified by:
createTicketin interfaceorg.alfresco.authentication.handler.AuthenticationApi- Parameters:
credentials- Alfresco username and password- Returns:
- HTTP 201 with the username and ticket identifier
-
validateTicket
public org.springframework.http.ResponseEntity<org.alfresco.authentication.model.ValidTicketEntry> validateTicket()Validates the ticket supplied by the caller's provider, without renewing it.- Specified by:
validateTicketin interfaceorg.alfresco.authentication.handler.AuthenticationApi- Returns:
- HTTP 200 and the validated ticket identifier
-
deleteTicket
Revokes the caller's ticket in Alfresco and notifies the provider to discard that value.- Specified by:
deleteTicketin interfaceorg.alfresco.authentication.handler.AuthenticationApi- Returns:
- HTTP 204 after revocation
-