public abstract class AuthorizationInfo extends Object
WwwAuthInfo
,
PegasusLocalAuthInfo
Modifier and Type | Field and Description |
---|---|
protected String |
iA1 |
protected String |
iAddr |
protected String |
iAlgorithm |
protected String |
iCnonce |
protected PasswordAuthentication |
iCredentials |
protected long |
iNc |
protected String |
iNonce |
protected String |
iOpaque |
protected int |
iPort |
protected String |
iProtocol |
protected String |
iQop |
protected String |
iRealm |
protected String |
iResponse |
protected String |
iScheme |
protected String |
iUri |
Constructor and Description |
---|
AuthorizationInfo() |
Modifier and Type | Method and Description |
---|---|
static AuthorizationInfo |
createAuthorizationInfo(String pModule)
Factory method for AuthorizationInfo objects.
|
static AuthorizationInfo |
createAuthorizationInfo(String pModule,
Boolean pProxy,
String pAddress,
int pPort,
String pProtocol,
String pRealm,
String pScheme)
Factory method for AuthorizationInfo objects.
|
String |
getA1()
Returns A1
|
String |
getAddr()
Returns the address
|
String |
getAlgorithm()
Returns algorithm
|
String |
getCnonce()
Returns cnonce
|
PasswordAuthentication |
getCredentials()
Returns the credentials
|
abstract String |
getHeaderFieldName()
Gets the HTTP header field name for this authentication information
|
long |
getNc()
Returns nc
|
String |
getNonce()
Returns nonce
|
String |
getOpaque()
Returns opaque
|
int |
getPort()
Returns the port
|
String |
getProtocol()
Returns the protocol
|
String |
getQop()
Returns Qop
|
String |
getRealm()
Returns the realm
|
String |
getResponse()
Returns response
|
String |
getScheme()
Returns the scheme
|
String |
getURI()
Returns URI
|
void |
init(Boolean pProxy,
String pAddress,
int pPort,
String pProtocol,
String pRealm,
String pScheme)
Initialize
|
abstract boolean |
isKeptAlive()
Determines if the connection is kept alive after the "401 Unauthorized"
response
|
abstract boolean |
isSentOnFirstRequest()
Determines if the authorization information is already sent on the very
first http request or after the "401 Unauthorized" response
|
boolean |
match(Object obj)
Compares two authorization informations.
|
void |
setA1(String A1)
Sets A1
|
void |
setAlgorithm(String algorithm)
Set algorithm
|
void |
setCnonce(String cnonce)
Set cnonce
|
void |
setCredentials(PasswordAuthentication credentials)
Sets credentials
|
void |
setNc(long nc)
Sets nc
|
void |
setNonce(String nonce)
Sets nonce
|
void |
setOpaque(String opaque)
Sets opaque
|
void |
setQop(String qop)
Sets Qop
|
void |
setRealm(String realm)
Sets the realm
|
void |
setResponse(String response)
Sets response
|
void |
setScheme(String scheme)
Sets the scheme
|
void |
setURI(String uri)
Sets URI
|
abstract String |
toString() |
abstract void |
updateAuthenticationInfo(Challenge challenge,
String authenticate,
URI url,
String requestMethod)
Updates the authorization information according to a received challenge.
|
protected String iAddr
protected int iPort
protected String iProtocol
protected String iRealm
protected String iScheme
protected PasswordAuthentication iCredentials
protected long iNc
protected String iCnonce
protected String iOpaque
protected String iAlgorithm
protected String iUri
protected String iNonce
protected String iQop
protected String iA1
protected String iResponse
public void init(Boolean pProxy, String pAddress, int pPort, String pProtocol, String pRealm, String pScheme)
pProxy
- Proxy authentication ?pAddress
- Server addresspPort
- Server portpProtocol
- ProtocolpRealm
- RealmpScheme
- Schemepublic void setOpaque(String opaque)
opaque
- new Valuepublic String getOpaque()
public String getQop()
public void setQop(String qop)
qop
- New valuepublic long getNc()
public void setNc(long nc)
nc
- New valuepublic void setNonce(String nonce)
nonce
- New Valuepublic String getNonce()
public void setCnonce(String cnonce)
cnonce
- New valuepublic String getCnonce()
public void setAlgorithm(String algorithm)
algorithm
- New valuepublic String getAlgorithm()
public String getA1()
public void setA1(String A1)
A1
- New valuepublic void setResponse(String response)
response
- New valuepublic String getResponse()
public String getURI()
public void setURI(String uri)
uri
- New valuepublic void setCredentials(PasswordAuthentication credentials)
credentials
- New valuepublic String getAddr()
public int getPort()
public String getProtocol()
public String getRealm()
public void setRealm(String realm)
realm
- New valuepublic String getScheme()
public void setScheme(String scheme)
scheme
- New valuepublic PasswordAuthentication getCredentials()
public boolean match(Object obj)
obj
- The other authorization informationtrue
if type, realm, scheme, address, protocol and
port of both authorization informations are equal,
false
otherwise.public abstract void updateAuthenticationInfo(Challenge challenge, String authenticate, URI url, String requestMethod) throws NoSuchAlgorithmException
challenge
- The received challengeauthenticate
- The authenticate header fieldurl
- The url of the CIM serverrequestMethod
- The HTTP request method (POST or MPOST)NoSuchAlgorithmException
public abstract String getHeaderFieldName()
public abstract boolean isSentOnFirstRequest()
true
or false
public abstract boolean isKeptAlive()
true
or false
public static AuthorizationInfo createAuthorizationInfo(String pModule, Boolean pProxy, String pAddress, int pPort, String pProtocol, String pRealm, String pScheme)
pModule
- The authorization info type to be constructedpProxy
- Proxy authentication ?pAddress
- Server addresspPort
- Server portpProtocol
- Protocol (http/https)pRealm
- RealmpScheme
- Scheme (e.g. Basic, Digest)null
WBEMConfiguration.getHttpAuthenticationModule()
,
WwwAuthInfo
,
PegasusLocalAuthInfo
public static AuthorizationInfo createAuthorizationInfo(String pModule)
pModule
- The authorization info type to be constructednull
Copyright © 2005, 2012 IBM Corporation. All Rights Reserved.