package de.retest.recheck.auth;

import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.util.prefs.Preferences;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import de.retest.recheck.Rehub;
import de.retest.recheck.persistence.CloudPersistence;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class RehubAuthenticationHandler implements AuthenticationHandler {

	private static final Logger logger = LoggerFactory.getLogger( RehubAuthenticationHandler.class );

	@Override
	public void showWebLoginUri( final URI loginUri ) {
		try {
			Desktop.getDesktop().browse( loginUri );
		} catch ( final IOException e ) {
			logger.error( "Error opening browser for '{}'.", loginUri );
		}
	}

	@Override
	public void loginPerformed( final String token ) {
		logger.info( "Login successful." );
		log.info( "Please use this token for your CI: {}", token );
		Preferences.userNodeForPackage( Rehub.class ).put( CloudPersistence.RECHECK_API_KEY, token );
	}

	@Override
	public void loginFailed( final Throwable reason ) {
		logger.error( "Login failed: ", reason );
	}

}

@@ -141,66 +141,8 @@
 s;%0A%0A
-import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A
 impo
@@ -169,16 +169,16 @@
 .Rehub;%0A
+
 import d
@@ -346,108 +346,8 @@
  %7B%0A%0A
-%09private static final Logger logger = LoggerFactory.getLogger( RehubAuthenticationHandler.class );%0A%0A
 %09@Ov
@@ -496,27 +496,24 @@
 e ) %7B%0A%09%09%09log
-ger
 .error( %22Err
@@ -631,19 +631,16 @@
  %7B%0A%09%09log
-ger
 .info( %22
@@ -891,16 +891,13 @@
 ) %7B%0A
+
 %09%09log
-ger
 .err

Use lombok logger only