Class AuthTokenRegistry


  • @ThreadSafe
    public final class AuthTokenRegistry
    extends Object
    This class manages all the currently available authentications tokens.
    Author:
    Philip Helger
    • Method Detail

      • removeToken

        @Nonnull
        public static com.helger.commons.state.ESuccess removeToken​(@Nonnull
                                                                    String sTokenID)
      • getAllTokensOfSubject

        @Nonnull
        public static com.helger.commons.collection.impl.ICommonsList<IAuthToken> getAllTokensOfSubject​(@Nonnull
                                                                                                        IAuthSubject aSubject)
        Get all tokens of the specified auth subject. All tokens are returned, no matter whether they are expired or not.
        Parameters:
        aSubject - The subject to query. May not be null.
        Returns:
        The list and never null.
      • removeAllTokensOfSubject

        @Nonnegative
        public static int removeAllTokensOfSubject​(@Nonnull
                                                   IAuthSubject aSubject)
        Remove all tokens of the given subject
        Parameters:
        aSubject - The subject for which the tokens should be removed.
        Returns:
        The number of removed tokens. Always ≥ 0.