Class GrantService


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

      • GrantService

        public GrantService()
    • Method Detail

      • generateGrantId

        public static java.lang.String generateGrantId()
      • buildDn

        public java.lang.String buildDn​(java.lang.String p_hashedToken)
      • merge

        public void merge​(TokenLdap p_token)
      • mergeSilently

        public void mergeSilently​(TokenLdap p_token)
      • persist

        public void persist​(TokenLdap token)
      • getCacheClientTokens

        public ClientTokens getCacheClientTokens​(java.lang.String clientId)
      • getCacheSessionTokens

        public SessionTokens getCacheSessionTokens​(java.lang.String sessionDn)
      • remove

        public void remove​(TokenLdap p_token)
      • removeSilently

        public void removeSilently​(TokenLdap token)
      • remove

        public void remove​(java.util.List<TokenLdap> p_entries)
      • removeSilently

        public void removeSilently​(java.util.List<TokenLdap> p_entries)
      • getGrantsOfClient

        public java.util.List<TokenLdap> getGrantsOfClient​(java.lang.String p_clientId)
      • getGrantByCode

        public TokenLdap getGrantByCode​(java.lang.String p_code)
      • getGrantsByGrantId

        public java.util.List<TokenLdap> getGrantsByGrantId​(java.lang.String p_grantId)
      • getGrantsByAuthorizationCode

        public java.util.List<TokenLdap> getGrantsByAuthorizationCode​(java.lang.String p_authorizationCode)
      • getGrantsBySessionDn

        public java.util.List<TokenLdap> getGrantsBySessionDn​(java.lang.String sessionDn)
      • getGrantsFromCacheBySessionDn

        public java.util.List<TokenLdap> getGrantsFromCacheBySessionDn​(java.lang.String sessionDn)
      • getCacheClientTokensEntries

        public java.util.List<TokenLdap> getCacheClientTokensEntries​(java.lang.String clientId)
      • getCacheTokensEntries

        public java.util.List<TokenLdap> getCacheTokensEntries​(java.util.Set<java.lang.String> tokenHashes)
      • logout

        public void logout​(java.lang.String sessionDn)
      • removeAllTokensBySession

        public void removeAllTokensBySession​(java.lang.String sessionDn,
                                             boolean logout)
      • removeByCode

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

        public void removeAuthorizationCode​(java.lang.String code)
      • removeAllByAuthorizationCode

        public void removeAllByAuthorizationCode​(java.lang.String p_authorizationCode)
      • removeAllByGrantId

        public void removeAllByGrantId​(java.lang.String p_grantId)