Package io.milton.http
Class Auth
- java.lang.Object
-
- io.milton.http.Auth
-
public class Auth extends Object
Holds authentication information for a request There are two sets of information: - that which is present in the request - that which is determined as part of performing authentication Note that even if authentication fails, this object will still be available in the request - DO NOT USE THE PRESENCE OF THIS OBJECT TO CHECK FOR A VALID LOGIN!!! Instead use the tag property. This will ONLY be not null after a successful authentication
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuth.SchemeCommon HTTP authentication schemes, and some non-http specified but common ones
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CharsetgetBasicParCharset()StringgetCnonce()StringgetNc()StringgetNonce()StringgetPassword()StringgetQop()StringgetRealm()StringgetResponseDigest()Auth.SchemegetScheme()ObjectgetTag()Holds application specific user data, as returned from the authenticate method on Resource This should be used to test for a valid login.StringgetUri()StringgetUser()booleanisNonceStale()voidsetNonceStale(boolean nonceStale)set by digest auth processing.voidsetTag(Object authTag)Set after a successful authenticate method with a not-null value The actual value will be application dependentStringtoString()
-
-
-
Method Detail
-
getBasicParCharset
public static Charset getBasicParCharset()
-
getUser
public String getUser()
- Returns:
- - the user property in the request. This MIGHT NOT be an actual user
-
setTag
public void setTag(Object authTag)
Set after a successful authenticate method with a not-null value The actual value will be application dependent- Parameters:
authTag-
-
getTag
public Object getTag()
Holds application specific user data, as returned from the authenticate method on Resource This should be used to test for a valid login.- Returns:
- some object identifying the user, normally returned from Resource.authenticate
-
getPassword
public String getPassword()
-
getScheme
public Auth.Scheme getScheme()
-
getCnonce
public String getCnonce()
-
getNc
public String getNc()
-
getNonce
public String getNonce()
-
getQop
public String getQop()
-
getRealm
public String getRealm()
-
getResponseDigest
public String getResponseDigest()
-
getUri
public String getUri()
-
isNonceStale
public boolean isNonceStale()
-
setNonceStale
public void setNonceStale(boolean nonceStale)
set by digest auth processing. Used to add stale nonce flag to challenge- Parameters:
nonceStale-
-
-