For PMD and copyright.
This commit is contained in:
parent
986b125a81
commit
dd600537b0
@ -28,6 +28,7 @@ import com.alibaba.nacos.auth.model.Permission;
|
||||
*
|
||||
* @author xiweng.yy
|
||||
*/
|
||||
@SuppressWarnings("PMD.ServiceOrDaoClassShouldEndWithImplRule")
|
||||
public class AddressServerAuthManager implements AuthService {
|
||||
|
||||
@Override
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 1999-2021 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* 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 com.alibaba.nacos.auth.persist;
|
||||
|
||||
import com.alibaba.nacos.auth.model.Page;
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 1999-2021 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* 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 com.alibaba.nacos.auth.persist.repository.embedded;
|
||||
|
||||
import com.alibaba.nacos.auth.configuration.ConditionOnEmbeddedStorage;
|
||||
|
@ -1 +1,17 @@
|
||||
com.alibaba.nacos.auth.NacosAuthServiceImpl
|
||||
#
|
||||
# Copyright 1999-2021 Alibaba Group Holding Ltd.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
com.alibaba.nacos.auth.NacosAuthServiceImpl
|
||||
|
@ -20,6 +20,11 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Login identity context.
|
||||
*
|
||||
* @author Nacos
|
||||
*/
|
||||
public class LoginIdentityContext {
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,11 @@
|
||||
|
||||
package com.alibaba.nacos.client.auth.impl;
|
||||
|
||||
/**
|
||||
* Nacos auth login constants.
|
||||
*
|
||||
* @author Nacos
|
||||
*/
|
||||
public class NacosAuthLoginConstant {
|
||||
|
||||
public static final String ACCESSTOKEN = "accessToken";
|
||||
|
@ -38,6 +38,11 @@ import java.util.Properties;
|
||||
import static com.alibaba.nacos.client.naming.utils.UtilAndComs.HTTP;
|
||||
import static com.alibaba.nacos.client.naming.utils.UtilAndComs.webContext;
|
||||
|
||||
/**
|
||||
* Login processor for Http.
|
||||
*
|
||||
* @author Nacos
|
||||
*/
|
||||
public class HttpLoginProcessor implements LoginProcessor {
|
||||
|
||||
private static final Logger SECURITY_LOGGER = LoggerFactory.getLogger(HttpLoginProcessor.class);
|
||||
|
@ -19,6 +19,11 @@ package com.alibaba.nacos.client.auth.impl.process;
|
||||
import com.alibaba.nacos.client.auth.LoginIdentityContext;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* Nacos login processor.
|
||||
*
|
||||
* @author Nacos
|
||||
*/
|
||||
public interface LoginProcessor {
|
||||
/**
|
||||
* send request to server and get result.
|
||||
|
@ -20,6 +20,11 @@ import com.alibaba.nacos.common.http.client.NacosRestTemplate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Client auth services SPI.
|
||||
*
|
||||
* @author Nacos
|
||||
*/
|
||||
public abstract class AbstractClientAuthService implements ClientAuthService {
|
||||
|
||||
protected List<String> serverList;
|
||||
|
@ -70,7 +70,7 @@ public class SecurityProxy implements Closeable {
|
||||
* @return a combination of all context.
|
||||
*/
|
||||
public Map<String, String> getIdentityContext(RequestResource resource) {
|
||||
Map<String, String> header = new HashMap<>();
|
||||
Map<String, String> header = new HashMap<>(1);
|
||||
for (ClientAuthService clientAuthService : clientAuthPluginManager.getAuthServiceSpiImplSet()) {
|
||||
LoginIdentityContext loginIdentityContext = clientAuthService.getLoginIdentityContext(resource);
|
||||
for (String key : loginIdentityContext.getAllKey()) {
|
||||
|
Loading…
Reference in New Issue
Block a user