public static AuthenticationBuilder newInstance ( final Authentication source ) { val builder = new DefaultAuthenticationBuilder ( source . getPrincipal ( ) ) ; builder . setAuthenticationDate ( source . getAuthenticationDate ( ) ) ; builder . setCredentials ( source . getCredentials ( ) ) ; builder . setSuccesses ( source . getSuccesses ( ) ) ; builder . setFailures ( source . getFailures ( ) ) ; builder . setAttributes ( source . getAttributes ( ) ) ; builder . setWarnings ( source . getWarnings ( ) ) ; return builder ; }
Creates a new builder initialized with data from the given authentication source .