-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into dev-extpersist
- Loading branch information
Showing
196 changed files
with
5,183 additions
and
1,234 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ test/logs | |
derby.log | ||
yarn.lock | ||
.flattened-pom.xml | ||
lefthook.yml |
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
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
68 changes: 68 additions & 0 deletions
68
auth/src/test/java/com/alibaba/nacos/auth/mock/MockAuthPluginServiceB.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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* 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.mock; | ||
|
||
import com.alibaba.nacos.plugin.auth.api.IdentityContext; | ||
import com.alibaba.nacos.plugin.auth.api.Permission; | ||
import com.alibaba.nacos.plugin.auth.api.Resource; | ||
import com.alibaba.nacos.plugin.auth.constant.ActionTypes; | ||
import com.alibaba.nacos.plugin.auth.spi.server.AuthPluginService; | ||
|
||
import java.util.Collection; | ||
import java.util.Collections; | ||
|
||
public class MockAuthPluginServiceB implements AuthPluginService { | ||
|
||
public static final String TEST_PLUGIN = "testB"; | ||
|
||
public static final String IDENTITY_TEST_KEY = "identity-test-key"; | ||
|
||
@Override | ||
public Collection<String> identityNames() { | ||
return Collections.singletonList(IDENTITY_TEST_KEY); | ||
} | ||
|
||
@Override | ||
public boolean enableAuth(ActionTypes action, String type) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean validateIdentity(IdentityContext identityContext, Resource resource) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public Boolean validateAuthority(IdentityContext identityContext, Permission permission) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public String getAuthServiceName() { | ||
return TEST_PLUGIN; | ||
} | ||
|
||
@Override | ||
public boolean isLoginEnabled() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean isAdminRequest() { | ||
return false; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ | |
# | ||
|
||
com.alibaba.nacos.auth.mock.MockAuthPluginService | ||
com.alibaba.nacos.auth.mock.MockAuthPluginServiceB |
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
Oops, something went wrong.