|
Oracle Fusion Middleware Oracle WebLogic SIP Server API Reference 11g Release 1 (10.3.4) Part Number E17873-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.wcp.sip.util.DigestUtils
public final class DigestUtils
Conveneince methods for Digest authentication process.
Method Summary | |
---|---|
static java.lang.String |
byteToHex(byte b)
Method that converts one byte data into a two-digit hexadecimal string. |
static java.lang.String |
createDigestResponseWithHA1(java.lang.String username,
java.lang.String ha1,
java.util.Map challengeMap,
java.lang.String sipMethod,
java.lang.String sipUri,
java.lang.String qop,
java.lang.String nonceCnt,
java.lang.String cnonce,
java.lang.String entityBody)
This method creates the DIGEST authentication response for the client, using the HA1 and other parameters that are passed in. |
static java.lang.String |
createDigestResponseWithPassword(java.lang.String username,
java.lang.String password,
java.util.Map challengeMap,
java.lang.String sipMethod,
java.lang.String sipUri,
java.lang.String qop,
java.lang.String nonceCnt,
java.lang.String cnonce,
java.lang.String entityBody)
This method creates the DIGEST authentication response for the client, using the clear text password and other parameters that are passed in. |
static java.lang.String |
getDigest(java.lang.String ha1,
java.lang.String nonce,
java.lang.String nonceCount,
java.lang.String clientNonce,
java.lang.String qop,
java.lang.String ha2)
Calculates the HTTP digest. |
static java.lang.String |
getDigest(java.lang.String ha1,
java.lang.String nonce,
java.lang.String nonceCount,
java.lang.String clientNonce,
java.lang.String qop,
java.lang.String method,
java.lang.String digestUri)
Calculates the HTTP digest. |
static java.lang.String |
getDigest(java.lang.String ha1,
java.lang.String nonce,
java.lang.String nonceCount,
java.lang.String clientNonce,
java.lang.String qop,
java.lang.String method,
java.lang.String digestUri,
java.lang.String entityBody)
Calculates the HTTP digest. |
static java.lang.String |
getHA1(java.lang.String username,
java.lang.String realm,
java.lang.String passwd)
Retrieves the HA1 for Digest authentication. |
static java.lang.String |
getHash(java.lang.String input)
Returns an MD5 hash of the input String. |
static java.lang.String |
getMD5SessHA1(java.lang.String username,
java.lang.String realm,
java.lang.String passwd,
java.lang.String nonce,
java.lang.String cnonce)
Retrieves the HA1 for Digest authentication. |
static java.util.HashMap<java.lang.String,java.lang.String> |
parseDigestChallenge(java.lang.String challenge)
This method is a convenience method to break the value of "WWW-Authenticate" or "Proxy-Authenticate" header into key value pairs. |
static java.lang.String |
stringToHex(java.lang.String str)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getHA1(java.lang.String username, java.lang.String realm, java.lang.String passwd)
username
- User namerealm
- realmpasswd
- Password
public static java.lang.String getMD5SessHA1(java.lang.String username, java.lang.String realm, java.lang.String passwd, java.lang.String nonce, java.lang.String cnonce)
username
- User namerealm
- realmpasswd
- Password
@NotNull public static java.lang.String getDigest(java.lang.String ha1, java.lang.String nonce, java.lang.String nonceCount, java.lang.String clientNonce, java.lang.String qop, java.lang.String method, java.lang.String digestUri, java.lang.String entityBody)
ha1
- HA1 stringnonce
- Nonce (any string)nonceCount
- Nonce count (any number of digits)clientNonce
- Client nonce (any string)qop
- Quality of Protection (either 'auth' or 'auth-int')method
- Method name (GET, etc.)digestUri
- URI of the subscriberentityBody
- body
@NotNull public static java.lang.String getDigest(java.lang.String ha1, java.lang.String nonce, java.lang.String nonceCount, java.lang.String clientNonce, java.lang.String qop, java.lang.String method, java.lang.String digestUri)
ha1
- HA1 stringnonce
- Nonce (any string)nonceCount
- Nonce count (any number of digits)clientNonce
- Client nonce (any string)qop
- Quality of Protection ('auth' or 'auth-int')method
- Method name (GET, etc.)digestUri
- URI of the subscriber
@NotNull public static java.lang.String getDigest(java.lang.String ha1, java.lang.String nonce, java.lang.String nonceCount, java.lang.String clientNonce, java.lang.String qop, java.lang.String ha2)
ha1
- HA1 stringnonce
- Nonce (any string)nonceCount
- Nonce count (any number of digits)clientNonce
- Client nonce (any string)qop
- Quality of Protection ('auth' or 'auth-int')ha2
- HA2 string
public static java.lang.String getHash(@NotNull java.lang.String input)
input
- String
public static java.util.HashMap<java.lang.String,java.lang.String> parseDigestChallenge(java.lang.String challenge)
challenge
- value of "WWW-Authenticate" or "Proxy-Authenticate" header
public static java.lang.String createDigestResponseWithHA1(java.lang.String username, java.lang.String ha1, java.util.Map challengeMap, java.lang.String sipMethod, java.lang.String sipUri, java.lang.String qop, java.lang.String nonceCnt, java.lang.String cnonce, java.lang.String entityBody)
username
- username Stringha1
- HA1 StringchallengeMap
- key-value pairs extracted from the digest challengesipMethod
- SIP methodsipUri
- SIP URIqop
- Quality of protection string - must be chosen from the
qop values sent by the servernonceCnt
- nonce count - required only when qop is presentcnonce
- client nonce - required only when qop is presententityBody
- entity body - needed only when qop="auth-int"
public static java.lang.String createDigestResponseWithPassword(java.lang.String username, java.lang.String password, java.util.Map challengeMap, java.lang.String sipMethod, java.lang.String sipUri, java.lang.String qop, java.lang.String nonceCnt, java.lang.String cnonce, java.lang.String entityBody)
username
- username Stringpassword
- password in clear-textchallengeMap
- key-value pairs extracted from the digest challengesipMethod
- SIP methodsipUri
- SIP URIqop
- Quality of protection string - must be chosen from the
qop values sent by the servernonceCnt
- nonce count - required only when qop is presentcnonce
- client nonce - required only when qop is presententityBody
- entity body - needed only when qop="auth-int"
public static java.lang.String byteToHex(byte b)
b
- input byte
@NotNull public static java.lang.String stringToHex(java.lang.String str)
str
-
|
Copyright 1996, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Oracle WebLogic SIP Server API Reference 11g Release 1 (10.3.4) Part Number E17873-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |