Package org.tmatesoft.svn.core.auth
Class SVNAuthentication
java.lang.Object
org.tmatesoft.svn.core.auth.SVNAuthentication
- Direct Known Subclasses:
SVNPasswordAuthentication
,SVNSSHAuthentication
,SVNSSLAuthentication
,SVNUserNameAuthentication
public class SVNAuthentication
extends java.lang.Object
The SVNAuthentication is the base class that represents user
credentials. SVNAuthentication provides only a username. Other
kinds of user credentials extend this base class and add their own specific
information.
User credentials used by SVNRepository drivers to authenticate a user to a repository server, are provided to those drivers by ISVNAuthenticationManager implementations.
- Since:
- 1.2
- Version:
- 1.3
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private java.lang.String
private SVNURL
private java.lang.String
-
Constructor Summary
ConstructorsConstructorDescriptionSVNAuthentication
(java.lang.String kind, java.lang.String userName, boolean storageAllowed) Deprecated.use constructor with SVNURL parameter insteadSVNAuthentication
(java.lang.String kind, java.lang.String userName, boolean storageAllowed, SVNURL url, boolean isPartial) Creates a username user credential object given a username. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Creates a deep copy of this credentials object.protected char[]
copyOf
(char[] source) void
Disposes sensitive data (e.g.java.lang.String
getKind()
Returns a credential kind for which this authentication credential is used.getURL()
java.lang.String
Reurns the username.boolean
Says if these credentials are partial.boolean
Says if this credential may be cached in the global auth cache.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
myUserName
private java.lang.String myUserName -
myIsStorageAllowed
private boolean myIsStorageAllowed -
myKind
private java.lang.String myKind -
myURL
-
myIsPartial
private boolean myIsPartial
-
-
Constructor Details
-
SVNAuthentication
public SVNAuthentication(java.lang.String kind, java.lang.String userName, boolean storageAllowed) Deprecated.use constructor with SVNURL parameter insteadCreates a username user credential object given a username.- Parameters:
kind
- a credential kinduserName
- a repository account usernamestorageAllowed
- if true then this credential is allowed to be stored in the global auth cache, otherwise not
-
SVNAuthentication
public SVNAuthentication(java.lang.String kind, java.lang.String userName, boolean storageAllowed, SVNURL url, boolean isPartial) Creates a username user credential object given a username.- Parameters:
kind
- a credential kinduserName
- a repository account usernamestorageAllowed
- if true then this credential is allowed to be stored in the global auth cache, otherwise noturl
- url these credentials are applied to- Since:
- 1.3.1
-
-
Method Details
-
getUserName
public java.lang.String getUserName()Reurns the username.- Returns:
- a repository account username
-
isStorageAllowed
public boolean isStorageAllowed()Says if this credential may be cached in the global auth cache.- Returns:
- true if this credential may be stored, false if may not
-
isPartial
public boolean isPartial()Says if these credentials are partial. Partial credentials could miss password\passhprase and could be used to complement missing information.- Returns:
- true if parital; otherwise false
- Since:
- 1.3
-
getKind
public java.lang.String getKind()Returns a credential kind for which this authentication credential is used.- Returns:
- a credential kind
-
getURL
-
dismissSensitiveData
public void dismissSensitiveData()Disposes sensitive data (e.g. password) stored in this object.- Since:
- 1.8.9
-
copy
Creates a deep copy of this credentials object. Sensitive data (e.g. password) is copied too.- Returns:
- copy of this object.
- Since:
- 1.8.9
-
copyOf
protected char[] copyOf(char[] source)
-