Remove OAuth2ClientTemplatePropertiesLoader

Fixes gh-4598
This commit is contained in:
Joe Grandja 2017-10-05 20:15:01 -04:00
parent 1b7e761be4
commit 29d36e4d16
2 changed files with 0 additions and 93 deletions

View File

@ -1,49 +0,0 @@
/*
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.config.oauth2.client;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import java.io.IOException;
import java.util.Map;
/**
* A resource loader for OAuth 2.0 client template(s) properties.
*
* @author Joe Grandja
* @since 5.0.0
*/
public final class OAuth2ClientTemplatePropertiesLoader {
public static final String CLIENT_TEMPLATES_PROPERTY_PREFIX = "spring.security.oauth2.client.templates";
private static final String CLIENT_TEMPLATES_RESOURCE_LOCATION = "spring-security-oauth2-client-templates.properties";
private OAuth2ClientTemplatePropertiesLoader() {
}
public static Map<String, Object> loadClientTemplates() {
try {
return (Map) PropertiesLoaderUtils.loadProperties(
new ClassPathResource(CLIENT_TEMPLATES_RESOURCE_LOCATION, OAuth2ClientTemplatePropertiesLoader.class));
} catch (IOException ioe) {
throw new RuntimeException("Failed to load OAuth 2.0 client templates resource: "
+ CLIENT_TEMPLATES_RESOURCE_LOCATION, ioe);
}
}
}

View File

@ -1,44 +0,0 @@
# Google
spring.security.oauth2.client.templates.google.client-authentication-method=basic
spring.security.oauth2.client.templates.google.authorization-grant-type=authorization_code
spring.security.oauth2.client.templates.google.redirect-uri={scheme}://{serverName}:{serverPort}{contextPath}/oauth2/authorize/code/{registrationId}
spring.security.oauth2.client.templates.google.scope=openid, profile, email, address, phone
spring.security.oauth2.client.templates.google.authorization-uri=https://accounts.google.com/o/oauth2/v2/auth
spring.security.oauth2.client.templates.google.token-uri=https://www.googleapis.com/oauth2/v4/token
spring.security.oauth2.client.templates.google.user-info-uri=https://www.googleapis.com/oauth2/v3/userinfo
spring.security.oauth2.client.templates.google.jwk-set-uri=https://www.googleapis.com/oauth2/v3/certs
spring.security.oauth2.client.templates.google.client-name=Google
spring.security.oauth2.client.templates.google.client-alias=google
# GitHub
spring.security.oauth2.client.templates.github.client-authentication-method=basic
spring.security.oauth2.client.templates.github.authorization-grant-type=authorization_code
spring.security.oauth2.client.templates.github.redirect-uri={baseRedirectUrl}/oauth2/authorize/code/{registrationId}
spring.security.oauth2.client.templates.github.scope=user
spring.security.oauth2.client.templates.github.authorization-uri=https://github.com/login/oauth/authorize
spring.security.oauth2.client.templates.github.token-uri=https://github.com/login/oauth/access_token
spring.security.oauth2.client.templates.github.user-info-uri=https://api.github.com/user
spring.security.oauth2.client.templates.github.user-name-attribute-name=name
spring.security.oauth2.client.templates.github.client-name=GitHub
spring.security.oauth2.client.templates.github.client-alias=github
# Facebook
spring.security.oauth2.client.templates.facebook.client-authentication-method=post
spring.security.oauth2.client.templates.facebook.authorization-grant-type=authorization_code
spring.security.oauth2.client.templates.facebook.redirect-uri={scheme}://{serverName}:{serverPort}{contextPath}/oauth2/authorize/code/{registrationId}
spring.security.oauth2.client.templates.facebook.scope=public_profile, email
spring.security.oauth2.client.templates.facebook.authorization-uri=https://www.facebook.com/v2.8/dialog/oauth
spring.security.oauth2.client.templates.facebook.token-uri=https://graph.facebook.com/v2.8/oauth/access_token
spring.security.oauth2.client.templates.facebook.user-info-uri=https://graph.facebook.com/me
spring.security.oauth2.client.templates.facebook.user-name-attribute-name=name
spring.security.oauth2.client.templates.facebook.client-name=Facebook
spring.security.oauth2.client.templates.facebook.client-alias=facebook
# Okta
spring.security.oauth2.client.templates.okta.client-authentication-method=basic
spring.security.oauth2.client.templates.okta.authorization-grant-type=authorization_code
spring.security.oauth2.client.templates.okta.redirect-uri={scheme}://{serverName}:{serverPort}{contextPath}/oauth2/authorize/code/{registrationId}
spring.security.oauth2.client.templates.okta.scope=openid, profile, email, address, phone
spring.security.oauth2.client.templates.okta.client-name=Okta
spring.security.oauth2.client.templates.okta.client-alias=okta