Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * ====================================================================
  * Copyright (c) 2004-2006 TMate Software Ltd.  All rights reserved.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
  * are also available at http://svnkit.com/license.html
  * If newer versions of this license are posted there, you may use a
  * newer version instead, at your option.
 * ====================================================================
 */
package org.tmatesoft.svn.core.auth;

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.

public class SVNAuthentication {
    
    private String myUserName;
    private boolean myIsStorageAllowed;
    private String myKind;
    
    
Creates a username user credential object given a username.

Parameters:
kind a credential kind
userName a repository account username
storageAllowed if true then this credential is allowed to be stored in the global auth cache, otherwise not
    public SVNAuthentication(String kindString userNameboolean storageAllowed) {
         = userName;
         = storageAllowed;
         = kind;
    }
    
    
Reurns the username.

Returns:
a repository account username
    public String getUserName() {
        return ;
    }
    
    
Says if this credential may be cached in the global auth cache.

Returns:
true if this credential may be stored, false if may not
    public boolean isStorageAllowed() {
        return ;
    }
    
    
Returns a credential kind for which this authentication credential is used.

Returns:
a credential kind
    public String getKind() {
        return ;
    }
New to GrepCode? Check out our FAQ X