@Test public void testFill() { Authentication auth = new SecretAuthentication( "key", "value" ); AuthenticationContext context = newContext( auth ); assertEquals( null, context.get( "another-key" ) ); assertEquals( "value", context.get( "key" ) ); }
public void fill( AuthenticationContext context, String key, Map<String, String> data ) { char[] secret = copy( value ); xor( secret ); context.put( this.key, secret ); }
SecretAuthentication implements Authentication { public void fill( AuthenticationContext context, String key, Map<String, String> data ) { char[] secret = copy( value ); xor( secret ); context.put( this.key, secret ); } }
SecretAuthentication implements Authentication { public void fill( AuthenticationContext context, String key, Map<String, String> data ) { char[] secret = copy( value ); xor( secret ); context.put( this.key, secret ); } SecretAuthentication( String key, String value );  SecretAuthentication( String key, char[] value ); private  SecretAuthentication( char[] value, String key ); }
SecretAuthentication implements Authentication { public void fill( AuthenticationContext context, String key, Map<String, String> data ) { char[] secret = copy( value ); xor( secret ); context.put( this.key, secret ); } SecretAuthentication( String key, String value );  SecretAuthentication( String key, char[] value ); private  SecretAuthentication( char[] value, String key ); void fill( AuthenticationContext context, String key, Map<String, String> data ); void digest( AuthenticationDigest digest ); @Override boolean equals( Object obj ); @Override int hashCode(); @Override String toString(); }
SecretAuthentication implements Authentication { public void fill( AuthenticationContext context, String key, Map<String, String> data ) { char[] secret = copy( value ); xor( secret ); context.put( this.key, secret ); } SecretAuthentication( String key, String value );  SecretAuthentication( String key, char[] value ); private  SecretAuthentication( char[] value, String key ); void fill( AuthenticationContext context, String key, Map<String, String> data ); void digest( AuthenticationDigest digest ); @Override boolean equals( Object obj ); @Override int hashCode(); @Override String toString();  }