This file contains hidden or 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
@Autowired | |
private FacebookPrincipalExtractor facebookPrincipalExtractor; | |
@Autowired | |
private FacebookAuthoritiesExtractor facebookAuthoritiesExtractor; | |
@Autowired | |
private GooglePrincipalExtractor googlePrincipalExtractor; | |
@Autowired | |
private GoogleAuthoritiesExtractor googleAuthoritiesExtractor; | |
@Bean |
This file contains hidden or 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
@Autowired | |
private PrincipalExtractor principalExtractor; | |
private Filter ssoFilter() { | |
OAuth2ClientAuthenticationProcessingFilter facebookFilter = new OAuth2ClientAuthenticationProcessingFilter("/login/facebook"); | |
OAuth2RestTemplate facebookTemplate = new OAuth2RestTemplate(facebook(), oauth2ClientContext); | |
facebookFilter.setRestTemplate(facebookTemplate); | |
UserInfoTokenServices tokenServices = new UserInfoTokenServices(facebookResource().getUserInfoUri(), facebook().getClientId()); | |
tokenServices.setRestTemplate(facebookTemplate); | |
tokenServices.setPrincipalExtractor(principalExtractor); |
This file contains hidden or 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
@Component | |
@ConfigurationProperties("provider") | |
public class ProviderInfo { | |
private String name; | |
private boolean enabled; | |
private List<String> roles; | |
} |
This file contains hidden or 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
@Configuration | |
public class AppConfig { | |
// Using SpEL | |
@Value("#{providerInfo.name ?: 'bar'}") | |
private String providerName; | |
// Injecting a Duration w/ a default | |
@Value("${timeout:500ms}") | |
private Duration timeout; | |
} |
This file contains hidden or 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
@Configuration | |
public class AppConfig { | |
@Bean | |
@ConfigurationProperties("provider") | |
public ProviderInfo providerInfo() { | |
return new ProviderInfo(); | |
} | |
} |
This file contains hidden or 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
public class NonInnerClass { | |
private String name; | |
} |
This file contains hidden or 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
@Component | |
@ConfigurationProperties("props") | |
public class InnerClassProperties { | |
private InnerClass innerClass; | |
private InnerClass otherInnerClass; | |
public static class InnerClass { | |
private String name; | |
} | |
} |
This file contains hidden or 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
@Configuration | |
public class AppConfig { | |
@Bean | |
@ConfigurationProperties("foo") | |
public ProviderInfo fooProviderInfo() { | |
return new ProviderInfo(); | |
} | |
@Bean | |
@ConfigurationProperties("bar") |
This file contains hidden or 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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>When I'm Remote, You're Remote</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"></link> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="page-header"> |
NewerOlder