Interface TokenService


  • public interface TokenService
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String generate()
      Generates a user token
      Nota: See the security configuration to determine the validity time of the generated token
      java.lang.String generate​(long validityTime)  
      com.flower.docs.domain.security.Token generateForDocuments​(java.util.List<com.flower.docs.domain.common.Id> documentIds, boolean readOnly)  
      com.flower.docs.domain.security.Token generateForFiles​(java.util.List<com.flower.docs.domain.common.Id> fileIds, boolean readOnly)  
      java.lang.Boolean validate​(java.lang.String token)  
    • Method Detail

      • generate

        java.lang.String generate()
                           throws com.flower.docs.domain.exception.FunctionalException,
                                  com.flower.docs.domain.exception.TechnicalException
        Generates a user token
        Nota: See the security configuration to determine the validity time of the generated token
        Returns:
        The user token
        Throws:
        com.flower.docs.domain.exception.TechnicalException
        com.flower.docs.domain.exception.FunctionalException
      • generate

        java.lang.String generate​(long validityTime)
                           throws com.flower.docs.domain.exception.FunctionalException,
                                  com.flower.docs.domain.exception.TechnicalException
        Throws:
        com.flower.docs.domain.exception.FunctionalException
        com.flower.docs.domain.exception.TechnicalException
      • generateForDocuments

        com.flower.docs.domain.security.Token generateForDocuments​(java.util.List<com.flower.docs.domain.common.Id> documentIds,
                                                                   boolean readOnly)
                                                            throws com.flower.docs.domain.exception.FunctionalException,
                                                                   com.flower.docs.domain.exception.TechnicalException
        Throws:
        com.flower.docs.domain.exception.FunctionalException
        com.flower.docs.domain.exception.TechnicalException
      • generateForFiles

        com.flower.docs.domain.security.Token generateForFiles​(java.util.List<com.flower.docs.domain.common.Id> fileIds,
                                                               boolean readOnly)
                                                        throws com.flower.docs.domain.exception.FunctionalException,
                                                               com.flower.docs.domain.exception.TechnicalException
        Throws:
        com.flower.docs.domain.exception.FunctionalException
        com.flower.docs.domain.exception.TechnicalException
      • validate

        java.lang.Boolean validate​(java.lang.String token)
                            throws com.flower.docs.domain.exception.FunctionalException,
                                   com.flower.docs.domain.exception.TechnicalException
        Throws:
        com.flower.docs.domain.exception.FunctionalException
        com.flower.docs.domain.exception.TechnicalException