public void digest( AuthenticationDigest digest ) { digest.update( key, value ); }
private AuthenticationDigest( RepositorySystemSession session, RemoteRepository repository, Proxy proxy ) { this.session = session; this.repository = repository; this.proxy = proxy; digest = newDigest(); }
private String getRepoKey(RepositorySystemSession session, RemoteRepository repository) { StringBuilder buffer = new StringBuilder(128); Proxy proxy = repository.getProxy(); if (proxy != null) { buffer.append(AuthenticationDigest.forProxy(session, repository)).append('@'); buffer.append(proxy.getHost()).append(':').append(proxy.getPort()).append('>'); } buffer.append(AuthenticationDigest.forRepository(session, repository)).append('@'); buffer.append(repository.getContentType()).append('-'); buffer.append(normalizeRepoUrl(repository.getUrl())); return buffer.toString(); }
/** * Gets the fingerprint for the authentication of the specified repository. * * @param session The repository system session during which the fingerprint is requested, must not be {@code null}. * @param repository The repository whose authentication is to be fingerprinted, must not be {@code null}. * @return The fingerprint of the repository authentication or an empty string if no authentication is configured, * never {@code null}. */ public static String forRepository( RepositorySystemSession session, RemoteRepository repository ) { String digest = ""; Authentication auth = repository.getAuthentication(); if ( auth != null ) { AuthenticationDigest authDigest = new AuthenticationDigest( session, repository, null ); auth.digest( authDigest ); digest = authDigest.digest(); } return digest; }
private String getRepoKey(RepositorySystemSession session, RemoteRepository repository) { StringBuilder buffer = new StringBuilder(128); Proxy proxy = repository.getProxy(); if (proxy != null) { buffer.append(AuthenticationDigest.forProxy(session, repository)).append('@'); buffer.append(proxy.getHost()).append(':').append(proxy.getPort()).append('>'); } buffer.append(AuthenticationDigest.forRepository(session, repository)).append('@'); buffer.append(repository.getContentType()).append('-'); buffer.append(normalizeRepoUrl(repository.getUrl())); return buffer.toString(); }
/** * Gets the fingerprint for the authentication of the specified repository. * * @param session The repository system session during which the fingerprint is requested, must not be {@code null}. * @param repository The repository whose authentication is to be fingerprinted, must not be {@code null}. * @return The fingerprint of the repository authentication or an empty string if no authentication is configured, * never {@code null}. */ public static String forRepository( RepositorySystemSession session, RemoteRepository repository ) { String digest = ""; Authentication auth = repository.getAuthentication(); if ( auth != null ) { AuthenticationDigest authDigest = new AuthenticationDigest( session, repository, null ); auth.digest( authDigest ); digest = authDigest.digest(); } return digest; }
private String getRepoKey( RepositorySystemSession session, RemoteRepository repository ) { StringBuilder buffer = new StringBuilder( 128 ); Proxy proxy = repository.getProxy(); if ( proxy != null ) { buffer.append( AuthenticationDigest.forProxy( session, repository ) ).append( '@' ); buffer.append( proxy.getHost() ).append( ':' ).append( proxy.getPort() ).append( '>' ); } buffer.append( AuthenticationDigest.forRepository( session, repository ) ).append( '@' ); buffer.append( repository.getContentType() ).append( '-' ); buffer.append( repository.getId() ).append( '-' ); buffer.append( normalizeRepoUrl( repository.getUrl() ) ); return buffer.toString(); }
@Override public void digest(AuthenticationDigest digest) { digest.update(AuthenticationContext.USERNAME, username, AuthenticationContext.PASSWORD, password); } };
/** * Gets the fingerprint for the authentication of the specified repository's proxy. * * @param session The repository system session during which the fingerprint is requested, must not be {@code null}. * @param repository The repository whose proxy authentication is to be fingerprinted, must not be {@code null}. * @return The fingerprint of the proxy authentication or an empty string if no proxy is present or if no proxy * authentication is configured, never {@code null}. */ public static String forProxy( RepositorySystemSession session, RemoteRepository repository ) { String digest = ""; Proxy proxy = repository.getProxy(); if ( proxy != null ) { Authentication auth = proxy.getAuthentication(); if ( auth != null ) { AuthenticationDigest authDigest = new AuthenticationDigest( session, repository, proxy ); auth.digest( authDigest ); digest = authDigest.digest(); } } return digest; }
private AuthenticationDigest( RepositorySystemSession session, RemoteRepository repository, Proxy proxy ) { this.session = session; this.repository = repository; this.proxy = proxy; digest = newDigest(); }
private String getRepoKey( RepositorySystemSession session, RemoteRepository repository ) { StringBuilder buffer = new StringBuilder( 128 ); Proxy proxy = repository.getProxy(); if ( proxy != null ) { buffer.append( AuthenticationDigest.forProxy( session, repository ) ).append( '@' ); buffer.append( proxy.getHost() ).append( ':' ).append( proxy.getPort() ).append( '>' ); } buffer.append( AuthenticationDigest.forRepository( session, repository ) ).append( '@' ); buffer.append( repository.getContentType() ).append( '-' ); buffer.append( repository.getId() ).append( '-' ); buffer.append( normalizeRepoUrl( repository.getUrl() ) ); return buffer.toString(); }
public void digest( AuthenticationDigest digest ) { digest.update( key, value ); }
/** * Gets the fingerprint for the authentication of the specified repository's proxy. * * @param session The repository system session during which the fingerprint is requested, must not be {@code null}. * @param repository The repository whose proxy authentication is to be fingerprinted, must not be {@code null}. * @return The fingerprint of the proxy authentication or an empty string if no proxy is present or if no proxy * authentication is configured, never {@code null}. */ public static String forProxy( RepositorySystemSession session, RemoteRepository repository ) { String digest = ""; Proxy proxy = repository.getProxy(); if ( proxy != null ) { Authentication auth = proxy.getAuthentication(); if ( auth != null ) { AuthenticationDigest authDigest = new AuthenticationDigest( session, repository, proxy ); auth.digest( authDigest ); digest = authDigest.digest(); } } return digest; }
public void digest( AuthenticationDigest digest ) { if ( value != null ) { digest.update( key, value.getClass().getName() ); } }
public void digest( AuthenticationDigest digest ) { // we don't know anything about the JRE's current authenticator, assume the worst (i.e. interactive) digest.update( UUID.randomUUID().toString() ); }
public void digest( AuthenticationDigest digest ) { if ( value != null ) { digest.update( key, value.getClass().getName() ); } }
public void digest( AuthenticationDigest digest ) { // we don't know anything about the JRE's current authenticator, assume the worst (i.e. interactive) digest.update( UUID.randomUUID().toString() ); }