Package org.tmatesoft.svn.core.auth

# Class SVNPasswordAuthentication

java.lang.Object
org.tmatesoft.svn.core.auth.SVNAuthentication
org.tmatesoft.svn.core.auth.SVNPasswordAuthentication

public class SVNPasswordAuthentication extends SVNAuthentication
The SVNPasswordAuthentication class represents a simple user credential pair - a username and password.

To obtain a password credential, specify the `PASSWORD` kind to credentials getter method of ISVNAuthenticationManager: `getFirstAuthentication()`, `getNextAuthentication()`.

Since:
  1.2
Version:
  1.3
Author:
  TMate Software Ltd.

## Constructor Summary

Constructors
Constructor
Description
`SVNPasswordAuthentication(String userName, String password, boolean storageAllowed)`
Deprecated.
use `newInstance(String, char[], boolean, SVNURL, boolean)`
`SVNPasswordAuthentication(String userName, String password, boolean storageAllowed, SVNURL url, boolean isPartial)`
Deprecated.
use `newInstance(String, char[], boolean, SVNURL, boolean)`

## Method Summary

Modifier and Type
Method
Description
`SVNAuthentication`
`copy()`
Creates a deep copy of this credentials object.
`void`
`dismissSensitiveData()`
Disposes sensitive data (e.g. password) stored in this object.
`String`
`getPassword()`
Deprecated.
Use `getPasswordValue()` method
`char[]`
`getPasswordValue()`
Returns password.
`static SVNPasswordAuthentication`
`newInstance(String userName, char[] password, boolean storageAllowed, SVNURL url, boolean isPartial)`
Creates a password user credential object given a username and password.

### Methods inherited from class org.tmatesoft.svn.core.auth.SVNAuthentication

`copyOf, getKind, getURL, getUserName, isPartial, isStorageAllowed`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SVNPasswordAuthentication

public SVNPasswordAuthentication(String userName, String password, boolean storageAllowed)
Deprecated.
use `newInstance(String, char[], boolean, SVNURL, boolean)`
Creates a password user credential object given a username and password.

Parameters:
  `userName` - the name of a user to authenticate
  `password` - the user's password
  `storageAllowed` - if true then this credential is allowed to be stored in the global auth cache, otherwise not

### SVNPasswordAuthentication

public SVNPasswordAuthentication(String userName, String password, boolean storageAllowed, SVNURL url, boolean isPartial)
Deprecated.
use `newInstance(String, char[], boolean, SVNURL, boolean)`
Creates a password user credential object given a username and password.

Parameters:
  `userName` - the name of a user to authenticate
  `password` - the user's password
  `storageAllowed` - if true then this credential is allowed to be stored in the global auth cache, otherwise not
  `url` - url these credentials are applied to
Since:
  1.3.1

## Method Details

### newInstance

public static SVNPasswordAuthentication newInstance(String userName, char[] password, boolean storageAllowed, SVNURL url, boolean isPartial)
Creates a password user credential object given a username and password.

Parameters:
  `userName` - the name of a user to authenticate
  `password` - the user's password
  `storageAllowed` - if true then this credential is allowed to be stored in the global auth cache, otherwise not
  `url` - url these credentials are applied to
  `isPartial` - whether this object only contains part of credentials information
Since:
  1.8.9

### getPassword

public String getPassword()
Deprecated.
Use `getPasswordValue()` method
Returns password.

Returns:
  password

### getPasswordValue

public char[] getPasswordValue()
Returns password.

Returns:
  password
Since:
  1.8.9

### dismissSensitiveData

public void dismissSensitiveData()
Description copied from class: `SVNAuthentication`
Disposes sensitive data (e.g. password) stored in this object.

Overrides:
  `dismissSensitiveData` in class `SVNAuthentication`

### copy

public SVNAuthentication copy()
Description copied from class: `SVNAuthentication`
Creates a deep copy of this credentials object. Sensitive data (e.g. password) is copied too.

Overrides:
  `copy` in class `SVNAuthentication`
Returns:
  copy of this object.