|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pfsw.security.authentication.LocationCredentials
public class LocationCredentials
Holds the userId and a password for a collection of URL patterns.
Constructor Summary | |
---|---|
LocationCredentials(java.lang.String userId,
java.lang.String password)
Initialize the new instance with a userId and corresponding passwords. |
|
LocationCredentials(java.lang.String realm,
java.lang.String userId,
java.lang.String password)
Initialize the new instance with a userId and corresponding passwords. |
Method Summary | |
---|---|
void |
addPattern(java.lang.String pattern)
Adds the given pattern to the URL patterns that can be accessed with this object's authentication credentials. |
void |
addPattern(org.pfsw.text.StringPattern pattern)
Adds the given pattern to the URL patterns that can be accessed with this object's authentication credentials. |
boolean |
appliesTo(java.lang.String realm,
java.lang.String url)
Returns true if the given realm and URL match the settings in this object. |
boolean |
appliesToRealm(java.lang.String realm)
Returns true if the given realm matches the realm name of this object. |
boolean |
appliesToURL(java.lang.String url)
Returns true if the given URL matches any of the underlying patterns. |
protected void |
fillCredentials()
Subclasses must override this method in order to get the credentials from somewhere and set a PasswordAuthentication object using setCredentials(). |
protected java.net.PasswordAuthentication |
getCredentials()
|
protected org.pfsw.text.StringPatternCollection |
getLocationPatterns()
|
java.net.PasswordAuthentication |
getPasswordAuthentication()
Returns the password based authentication data. |
java.lang.String |
getRealm()
Returns the realm this credentials apply to |
protected java.lang.String |
getRealmName()
|
protected java.lang.String |
getUserId()
|
protected void |
setCredentials(java.net.PasswordAuthentication newValue)
|
protected void |
setLocationPatterns(org.pfsw.text.StringPatternCollection newValue)
|
void |
setRealm(java.lang.String realm)
Sets the realm this credentials apply to |
protected void |
setRealmName(java.lang.String newValue)
|
protected void |
setUserId(java.lang.String newValue)
|
protected org.pfsw.text.StringUtil |
str()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocationCredentials(java.lang.String userId, java.lang.String password)
userId
- The userId to be used for authenticationpassword
- The password to be used for authenticationpublic LocationCredentials(java.lang.String realm, java.lang.String userId, java.lang.String password)
realm
- The realm that is accessible with the given credentialsuserId
- The userId to be used for authenticationpassword
- The password to be used for authenticationMethod Detail |
---|
public java.net.PasswordAuthentication getPasswordAuthentication()
public java.lang.String getRealm()
public void setRealm(java.lang.String realm)
public void addPattern(java.lang.String pattern)
pattern
- A URL pattern that might contain '*' as wildcards.public void addPattern(org.pfsw.text.StringPattern pattern)
pattern
- A URL pattern that might contain '*' as wildcards.public boolean appliesTo(java.lang.String realm, java.lang.String url)
public boolean appliesToURL(java.lang.String url)
public boolean appliesToRealm(java.lang.String realm)
protected void fillCredentials()
protected java.lang.String getRealmName()
protected void setRealmName(java.lang.String newValue)
protected org.pfsw.text.StringPatternCollection getLocationPatterns()
protected void setLocationPatterns(org.pfsw.text.StringPatternCollection newValue)
protected java.lang.String getUserId()
protected void setUserId(java.lang.String newValue)
protected java.net.PasswordAuthentication getCredentials()
protected void setCredentials(java.net.PasswordAuthentication newValue)
protected org.pfsw.text.StringUtil str()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |