1 package de.juplo.yourshouter;
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
5 import org.springframework.social.connect.Connection;
6 import org.springframework.social.connect.ConnectionKey;
7 import org.springframework.social.connect.ConnectionSignUp;
8 import org.springframework.stereotype.Service;
12 * Extracts the local user-ID from the data given by the provider.
17 public class ProviderUserIdConnectionSignUp implements ConnectionSignUp
19 private final Logger LOG =
20 LoggerFactory.getLogger(ProviderUserIdConnectionSignUp.class);
24 * This implementation simply reuse the ID, that was provided by the provider.
27 * The {@link Connection} for the unknown user.
29 * The user-ID, that was provided by the provider.
32 public String execute(Connection<?> connection)
34 ConnectionKey key = connection.getKey();
36 "signing up user {} from provider {}",
37 key.getProviderUserId(),
40 return key.getProviderUserId();