Class MongoRefreshTokenRepository

  • All Implemented Interfaces:
    com.rcore.domain.commons.port.CreateUpdateRepository<ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity>, com.rcore.domain.commons.port.CRUDRepository<String,​ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity,​ru.foodtechlab.lib.auth.service.domain.token.port.filter.RefreshTokenFilters>, com.rcore.domain.commons.port.DeleteRepository<String>, com.rcore.domain.commons.port.ReadRepository<String,​ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity,​ru.foodtechlab.lib.auth.service.domain.token.port.filter.RefreshTokenFilters>, io.foodtechlab.common.domain.port.SafeDeleteCRUDRepository<String,​ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity,​ru.foodtechlab.lib.auth.service.domain.token.port.filter.RefreshTokenFilters>, io.foodtechlab.common.domain.port.SafeDeleteRepository<String>, io.foodtechlab.common.domain.port.SafeReadRepository<String,​ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity,​ru.foodtechlab.lib.auth.service.domain.token.port.filter.RefreshTokenFilters>, ru.foodtechlab.lib.auth.service.domain.token.port.RefreshTokenRepository

    @Repository
    public class MongoRefreshTokenRepository
    extends io.foodtechlab.common.mongo.port.AbstractMongoSafeDeleteRepository<String,​ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity,​RefreshTokenDoc,​ru.foodtechlab.lib.auth.service.domain.token.port.filter.RefreshTokenFilters>
    implements ru.foodtechlab.lib.auth.service.domain.token.port.RefreshTokenRepository
    • Field Summary

      • Fields inherited from class com.rcore.database.mongo.commons.port.impl.AbstractMongoRepository

        documentClass, mapper, mongoTemplate
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deactivateByCredentialId​(String credentialId)  
      void expireRefreshToken​(ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity refreshTokenEntity)  
      List<ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity> findAllActiveByUserId​(String userId)  
      protected com.rcore.database.mongo.commons.query.AbstractExampleQuery getSearchQuery​(ru.foodtechlab.lib.auth.service.domain.token.port.filter.RefreshTokenFilters filters)  
      • Methods inherited from class io.foodtechlab.common.mongo.port.AbstractMongoSafeDeleteRepository

        delete, findById, forceFindById, permanentDelete, restore
      • Methods inherited from class com.rcore.database.mongo.commons.port.impl.AbstractMongoRepository

        count, exist, find, findSearch, save
      • Methods inherited from interface com.rcore.domain.commons.port.CreateUpdateRepository

        save
      • Methods inherited from interface com.rcore.domain.commons.port.DeleteRepository

        delete
      • Methods inherited from interface com.rcore.domain.commons.port.ReadRepository

        count, exist, find, findById
      • Methods inherited from interface io.foodtechlab.common.domain.port.SafeDeleteRepository

        permanentDelete, restore
      • Methods inherited from interface io.foodtechlab.common.domain.port.SafeReadRepository

        forceFindById
    • Constructor Detail

      • MongoRefreshTokenRepository

        public MongoRefreshTokenRepository​(RefreshTokenDocMapper mapper,
                                           org.springframework.data.mongodb.core.MongoTemplate mongoTemplate)
    • Method Detail

      • expireRefreshToken

        public void expireRefreshToken​(ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity refreshTokenEntity)
        Specified by:
        expireRefreshToken in interface ru.foodtechlab.lib.auth.service.domain.token.port.RefreshTokenRepository
      • findAllActiveByUserId

        public List<ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity> findAllActiveByUserId​(String userId)
        Specified by:
        findAllActiveByUserId in interface ru.foodtechlab.lib.auth.service.domain.token.port.RefreshTokenRepository
      • deactivateByCredentialId

        public void deactivateByCredentialId​(String credentialId)
        Specified by:
        deactivateByCredentialId in interface ru.foodtechlab.lib.auth.service.domain.token.port.RefreshTokenRepository
      • getSearchQuery

        protected com.rcore.database.mongo.commons.query.AbstractExampleQuery getSearchQuery​(ru.foodtechlab.lib.auth.service.domain.token.port.filter.RefreshTokenFilters filters)
        Specified by:
        getSearchQuery in class com.rcore.database.mongo.commons.port.impl.AbstractMongoRepository<String,​ru.foodtechlab.lib.auth.service.domain.token.entity.RefreshTokenEntity,​RefreshTokenDoc,​ru.foodtechlab.lib.auth.service.domain.token.port.filter.RefreshTokenFilters>