Removed more references to InitializingBean
parent
88db457fc4
commit
96e3f66a81
|
@ -20,7 +20,6 @@ import java.util.Collection;
|
|||
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.mitre.openid.connect.model.UserInfo;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.security.authentication.AuthenticationProvider;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
@ -35,22 +34,12 @@ import com.google.common.collect.Lists;
|
|||
*
|
||||
*/
|
||||
public class OIDCAuthenticationProvider implements
|
||||
AuthenticationProvider, InitializingBean {
|
||||
AuthenticationProvider {
|
||||
|
||||
private UserInfoFetcher userInfoFetcher = new UserInfoFetcher();
|
||||
|
||||
private GrantedAuthoritiesMapper authoritiesMapper = new NamedAdminAuthoritiesMapper();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.mitre.openid.connect.client.service.impl;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.mitre.oauth2.model.RegisteredClient;
|
||||
import org.mitre.openid.connect.client.service.ClientConfigurationService;
|
||||
import org.mitre.openid.connect.config.ServerConfiguration;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
/**
|
||||
* Client configuration service that holds a static map from issuer URL to a ClientDetails object to use at that issuer.
|
||||
|
@ -34,7 +35,7 @@ import org.springframework.beans.factory.InitializingBean;
|
|||
* @author jricher
|
||||
*
|
||||
*/
|
||||
public class StaticClientConfigurationService implements ClientConfigurationService, InitializingBean {
|
||||
public class StaticClientConfigurationService implements ClientConfigurationService {
|
||||
|
||||
// Map of issuer URL -> client configuration information
|
||||
private Map<String, RegisteredClient> clients;
|
||||
|
@ -64,10 +65,7 @@ public class StaticClientConfigurationService implements ClientConfigurationServ
|
|||
return clients.get(issuer.getIssuer());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||
*/
|
||||
@Override
|
||||
@PostConstruct
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
if (clients == null || clients.isEmpty()) {
|
||||
throw new IllegalArgumentException("Clients map cannot be null or empty");
|
||||
|
|
|
@ -21,9 +21,10 @@ package org.mitre.openid.connect.client.service.impl;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.mitre.openid.connect.client.service.ServerConfigurationService;
|
||||
import org.mitre.openid.connect.config.ServerConfiguration;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
/**
|
||||
* Statically configured server configuration service that maps issuer URLs to server configurations to use at that issuer.
|
||||
|
@ -31,7 +32,7 @@ import org.springframework.beans.factory.InitializingBean;
|
|||
* @author jricher
|
||||
*
|
||||
*/
|
||||
public class StaticServerConfigurationService implements ServerConfigurationService, InitializingBean {
|
||||
public class StaticServerConfigurationService implements ServerConfigurationService {
|
||||
|
||||
// map of issuer url -> server configuration information
|
||||
private Map<String, ServerConfiguration> servers;
|
||||
|
@ -58,10 +59,7 @@ public class StaticServerConfigurationService implements ServerConfigurationServ
|
|||
return servers.get(issuer);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||
*/
|
||||
@Override
|
||||
@PostConstruct
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
if (servers == null || servers.isEmpty()) {
|
||||
throw new IllegalArgumentException("Servers map cannot be null or empty.");
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
*/
|
||||
package org.mitre.openid.connect.client.service.impl;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.mitre.openid.connect.client.model.IssuerServiceResponse;
|
||||
import org.mitre.openid.connect.client.service.IssuerService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
|
@ -31,7 +31,7 @@ import com.google.common.base.Strings;
|
|||
* @author jricher
|
||||
*
|
||||
*/
|
||||
public class StaticSingleIssuerService implements IssuerService, InitializingBean {
|
||||
public class StaticSingleIssuerService implements IssuerService {
|
||||
|
||||
private String issuer;
|
||||
|
||||
|
@ -59,10 +59,7 @@ public class StaticSingleIssuerService implements IssuerService, InitializingBea
|
|||
return new IssuerServiceResponse(getIssuer(), null, null);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||
*/
|
||||
@Override
|
||||
@PostConstruct
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
|
||||
if (Strings.isNullOrEmpty(issuer)) {
|
||||
|
|
|
@ -23,12 +23,12 @@ import java.net.URISyntaxException;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.mitre.openid.connect.client.model.IssuerServiceResponse;
|
||||
import org.mitre.openid.connect.client.service.IssuerService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.security.authentication.AuthenticationServiceException;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
@ -40,7 +40,7 @@ import com.google.common.base.Strings;
|
|||
* @author jricher
|
||||
*
|
||||
*/
|
||||
public class ThirdPartyIssuerService implements IssuerService, InitializingBean {
|
||||
public class ThirdPartyIssuerService implements IssuerService {
|
||||
|
||||
private String accountChooserUrl;
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class ThirdPartyIssuerService implements IssuerService, InitializingBean
|
|||
/* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||
*/
|
||||
@Override
|
||||
@PostConstruct
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
if (Strings.isNullOrEmpty(this.accountChooserUrl)) {
|
||||
throw new IllegalArgumentException("Account Chooser URL cannot be null or empty");
|
||||
|
|
Loading…
Reference in New Issue