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

    Constructors
    Constructor
    Description
    Creates the ticket adapter with default Feign error mapping.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GrpcAuthenticationApi

      public GrpcAuthenticationApi(AuthenticationServiceClient authentication, TicketProvider tickets)
      Creates the ticket adapter with default Feign error mapping.
      Parameters:
      authentication - shared gRPC authentication client
      tickets - 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:
      createTicket in interface org.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:
      validateTicket in interface org.alfresco.authentication.handler.AuthenticationApi
      Returns:
      HTTP 200 and the validated ticket identifier
    • deleteTicket

      public org.springframework.http.ResponseEntity<Void> deleteTicket()
      Revokes the caller's ticket in Alfresco and notifies the provider to discard that value.
      Specified by:
      deleteTicket in interface org.alfresco.authentication.handler.AuthenticationApi
      Returns:
      HTTP 204 after revocation