Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package hudson.plugins.collabnet.auth;
 
 
 
public class CollabNetAuthManager implements AuthenticationManager {
    private String collabNetUrl;
    public CollabNetAuthManager(String collabNetUrl) {
        this. = collabNetUrl;
    }
    public String getCollabNetUrl() {
        return this.;
    }

    

Parameters:
authentication request object
Returns:
fully authenticated object, including credentials
    public Authentication authenticate(Authentication authentication
        throws BadCredentialsException {
        String username = authentication.getName();
        String password = (Stringauthentication.getCredentials();
        CollabNetApp cna = null;
        try {
            cna = new CollabNetApp(this.getCollabNetUrl(), usernamepassword);
        } catch (RemoteException re) {
            throw new BadCredentialsException("Failed to log into " + 
                                              this.getCollabNetUrl() + ": " + 
                                              re.getMessage());
        }
        return new CNAuthentication(authentication.getName(), cna);
    }
New to GrepCode? Check out our FAQ X