Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Downgraded required Java version from 1.7 to 1.6
Upgraded dependencies to: jackson, spring, spring-social, spring-security Added support for retrieving e-mail along with profile.
- Loading branch information
JNO
committed
Jun 28, 2016
1 parent
0950e30
commit 1b0fbd2
Showing
9 changed files
with
102 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 26 additions & 6 deletions
32
...n/java/org/springframework/social/live/config/annotation/LiveProviderConfigRegistrar.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,42 @@ | ||
package org.springframework.social.live.config.annotation; | ||
|
||
import org.springframework.social.config.annotation.AbstractProviderConfigRegistrarSupport; | ||
import org.springframework.beans.factory.support.BeanDefinitionRegistry; | ||
import org.springframework.core.type.AnnotationMetadata; | ||
import org.springframework.social.config.support.ProviderConfigurationSupport; | ||
import org.springframework.social.live.config.LiveApiHelper; | ||
import org.springframework.social.live.connect.LiveConnectionFactory; | ||
import org.springframework.social.live.security.LiveAuthenticationService; | ||
import org.springframework.social.security.provider.SocialAuthenticationService; | ||
|
||
public class LiveProviderConfigRegistrar extends | ||
AbstractProviderConfigRegistrarSupport { | ||
import java.lang.annotation.Annotation; | ||
import java.util.Map; | ||
|
||
public class LiveProviderConfigRegistrar extends ProviderConfigurationSupport { | ||
private final Class<? extends Annotation> providerConfigAnnotation; | ||
|
||
public LiveProviderConfigRegistrar() { | ||
|
||
super(EnableLive.class,LiveConnectionFactory.class,LiveApiHelper.class); | ||
super(LiveConnectionFactory.class, LiveApiHelper.class); | ||
this.providerConfigAnnotation = EnableLive.class; | ||
} | ||
|
||
@Override | ||
protected Class<? extends SocialAuthenticationService<?>> getAuthenticationServiceClass() { | ||
|
||
return LiveAuthenticationService.class; | ||
} | ||
|
||
public void registerBeanDefinitions(AnnotationMetadata metadata, BeanDefinitionRegistry registry) { | ||
Map<String, Object> allAttributes = metadata.getAnnotationAttributes(providerConfigAnnotation.getName()); | ||
registerBeanDefinitions(registry, allAttributes); | ||
} | ||
|
||
@Override | ||
protected String getAppId(Map<String, Object> allAttributes) { | ||
return (String) allAttributes.get("appId"); | ||
} | ||
|
||
@Override | ||
protected String getAppSecret(Map<String, Object> allAttributes) { | ||
return (String) allAttributes.get("appSecret"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters