Class DigestServerAuthenticationHelper

java.lang.Object
io.github.lunasaw.gbproxy.server.transimit.request.register.DigestServerAuthenticationHelper

public class DigestServerAuthenticationHelper extends Object
Implements the HTTP digest authentication method server side functionality.
Author:
M. Ranganathan, Marc Bednarek
  • Field Details

  • Constructor Details

    • DigestServerAuthenticationHelper

      public DigestServerAuthenticationHelper()
  • Method Details

    • toHexString

      public static String toHexString(byte[] b)
    • generateNonce

      public static String generateNonce()
      Generate the challenge string.
      Returns:
      a generated nonce.
    • doAuthenticateHashedPassword

      public static boolean doAuthenticateHashedPassword(javax.sip.message.Request request, String hashedPassword)
      Authenticate the inbound request.
      Parameters:
      request - - the request to authenticate.
      hashedPassword - -- the MD5 hashed string of username:realm:plaintext password.
      Returns:
      true if authentication succeded and false otherwise.
    • doAuthenticatePlainTextPassword

      public static boolean doAuthenticatePlainTextPassword(javax.sip.message.Request request, String pass)
      Authenticate the inbound request given plain text password.
      Parameters:
      request - - the request to authenticate.
      pass - -- the plain text password.
      Returns:
      true if authentication succeded and false otherwise.