Class GrantService


  • @ApplicationScoped
    public class GrantService
    extends Object
    Version:
    November 28, 2018
    Author:
    Yuriy Zabrovarnyy, Javier Rojas Blum
    • Constructor Detail

      • GrantService

        public GrantService()
    • Method Detail

      • generateGrantId

        public static String generateGrantId()
      • merge

        public void merge​(io.jans.model.token.TokenEntity token)
      • mergeSilently

        public void mergeSilently​(io.jans.model.token.TokenEntity token)
      • shouldPersist

        public boolean shouldPersist()
      • shouldSaveInCache

        public boolean shouldSaveInCache()
      • persist

        public void persist​(io.jans.model.token.TokenEntity token)
      • remove

        public void remove​(io.jans.model.token.TokenEntity token)
      • publishIdTokenLockMessage

        protected void publishIdTokenLockMessage​(io.jans.model.token.TokenEntity token,
                                                 String opearation)
      • removeSilently

        public void removeSilently​(io.jans.model.token.TokenEntity token)
      • remove

        public void remove​(List<io.jans.model.token.TokenEntity> entries)
      • removeSilently

        public void removeSilently​(List<io.jans.model.token.TokenEntity> entries)
      • getGrantsOfClient

        public List<io.jans.model.token.TokenEntity> getGrantsOfClient​(String clientId)
      • getGrantByCode

        public io.jans.model.token.TokenEntity getGrantByCode​(String code)
      • getGrantByReferenceId

        public io.jans.model.token.TokenEntity getGrantByReferenceId​(String referenceId)
      • getGrantsByGrantId

        public List<io.jans.model.token.TokenEntity> getGrantsByGrantId​(String grantId)
      • getGrantsByAuthorizationCode

        public List<io.jans.model.token.TokenEntity> getGrantsByAuthorizationCode​(String authorizationCode)
      • getGrantsBySessionDn

        public List<io.jans.model.token.TokenEntity> getGrantsBySessionDn​(String sessionDn)
      • getGrantsByUserDn

        public List<io.jans.model.token.TokenEntity> getGrantsByUserDn​(String userDn)
      • logout

        public void logout​(String sessionDn)
      • filterOutRefreshTokenFromDeletion

        public void filterOutRefreshTokenFromDeletion​(List<io.jans.model.token.TokenEntity> tokens)
      • removeAllTokensBySession

        public void removeAllTokensBySession​(String sessionDn)
      • removeByCode

        public void removeByCode​(String code)
        Removes grant with particular code.
        Parameters:
        code - code
      • removeAuthorizationCode

        public void removeAuthorizationCode​(String code)
      • removeAllByAuthorizationCode

        public void removeAllByAuthorizationCode​(String authorizationCode)
      • removeAllByGrantId

        public void removeAllByGrantId​(String grantId)