Interface AuthenticationToken

    • Method Detail

      • getOwnerId

        long getOwnerId()
        Returns:
        id of the user owning this token
      • getName

        @NotNull
        String getName()
        Returns:
        name of the token
      • getCreationTime

        @NotNull
        Date getCreationTime()
        Returns:
        date when this token was created
      • getExpirationTime

        @NotNull
        Date getExpirationTime()
        Returns:
        date when this token will expire
      • setTokenLastAccessInfo

        void setTokenLastAccessInfo​(@Nullable
                                    String lastAccessRemoteAddress)
        Sets last access IP address with last access date in pair
        Parameters:
        lastAccessRemoteAddress - IP address associated with last usage of this token
      • getPermissionsRestriction

        @Nullable
        AuthenticationToken.PermissionsRestriction getPermissionsRestriction()
        Returns:
        null if this token should have same permissions as the owner. If not null - token will have only the intersection of permissions from owner and the limit.
      • isConsistent

        boolean isConsistent​(@NotNull
                             SUser owner)
        Check for internal consistence of permission restrictions with token owner permissions
        Parameters:
        owner - SUser owner of the token
        Returns:
        false if permission restriction has permissions that are not assigned to user or if the user is not the owner of the token
        Since:
        2020.2