Exemplo n.º 1
0
 /**
  * Add the given {@link AuthenticationProtocol}. If an authentication protocol with the supplied
  * ID already exists, the supplied authentication protocol will not be added and the security
  * protocols will not be unchang.
  *
  * @param auth the AuthenticationProtocol to add (an existing authentication protcol with <code>
  *     auth</code>'s ID remains unchanged).
  */
 public synchronized void addAuthenticationProtocol(AuthenticationProtocol auth) {
   if (authProtocols.get(auth.getID()) == null) {
     authProtocols.put(auth.getID(), auth);
     if (auth.getDigestLength() > maxAuthDigestLength) {
       maxAuthDigestLength = auth.getDigestLength();
     }
   }
 }
Exemplo n.º 2
0
 /**
  * Remove the given {@link AuthenticationProtocol}.
  *
  * @param auth The protocol to remove
  */
 public void removeAuthenticationProtocol(AuthenticationProtocol auth) {
   authProtocols.remove(auth.getID());
 }