better char[] credential support
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@152 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
3a129bb90f
commit
5ff3346774
|
@ -132,6 +132,8 @@ public abstract class Credential
|
||||||
{
|
{
|
||||||
byte[] digest = null;
|
byte[] digest = null;
|
||||||
|
|
||||||
|
if (credentials instanceof char[])
|
||||||
|
credentials=new String((char[])credentials);
|
||||||
if (credentials instanceof Password || credentials instanceof String)
|
if (credentials instanceof Password || credentials instanceof String)
|
||||||
{
|
{
|
||||||
synchronized (__md5Lock)
|
synchronized (__md5Lock)
|
||||||
|
|
|
@ -266,6 +266,8 @@ public class DigestAuthenticator extends LoginAuthenticator
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
public boolean check(Object credentials)
|
public boolean check(Object credentials)
|
||||||
{
|
{
|
||||||
|
if (credentials instanceof char[])
|
||||||
|
credentials=new String((char[])credentials);
|
||||||
String password = (credentials instanceof String) ? (String) credentials : credentials.toString();
|
String password = (credentials instanceof String) ? (String) credentials : credentials.toString();
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue