Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for 830 #832

Merged
merged 6 commits into from
Oct 13, 2021
Merged

for 830 #832

merged 6 commits into from
Oct 13, 2021

Conversation

Aaron-boom
Copy link
Contributor

@@ -60,35 +49,27 @@ public String login(HttpServletRequest httpServletRequest, @RequestParam String
boolean flag = true;
if (iterator == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use (iterator != null && !iterator.hasNext()) better.

break;
}
}
if (flag) {
return creatToken(userName);
return JwtTokenUtil.generateToken(userName);
}
return null;
Copy link
Contributor

@haoyann haoyann Oct 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use AuthInterceptor.loginFailResponse not return null.

@Scheduled(cron= "0 5 * * * ?")
public void clearExpiredToken() {
tokenMap.entrySet().removeIf(entry -> entry.getValue() == null || System.currentTimeMillis() - entry.getValue().getLastUpdateTime() > sessionTimeoutMilli);
return true;
}

public static class User {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If User class not use should be removed.

/**
* Jwt signingKey
*/
private static final String secret = "a1g2y47dg3dj59fjhhsd7cnewy73j";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secret and expiration should be configurable.

@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2021

Codecov Report

Merging #832 (57ac6c4) into develop (888863a) will increase coverage by 0.14%.
The diff coverage is 5.12%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #832      +/-   ##
=============================================
+ Coverage      20.75%   20.89%   +0.14%     
- Complexity       424      429       +5     
=============================================
  Files            145      147       +2     
  Lines           4790     4795       +5     
  Branches         731      731              
=============================================
+ Hits             994     1002       +8     
+ Misses          3720     3714       -6     
- Partials          76       79       +3     
Flag Coverage Δ
unit 20.89% <5.12%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../org/apache/dubbo/admin/DubboAdminApplication.java 33.33% <0.00%> (ø)
...bo/admin/authentication/impl/DefaultPreHandle.java 0.00% <0.00%> (ø)
.../apache/dubbo/admin/controller/UserController.java 4.76% <0.00%> (-0.51%) ⬇️
...pache/dubbo/admin/interceptor/AuthInterceptor.java 10.52% <0.00%> (-1.24%) ⬇️
.../org/apache/dubbo/admin/utils/SpringBeanUtils.java 0.00% <0.00%> (ø)
...ava/org/apache/dubbo/admin/utils/JwtTokenUtil.java 10.00% <10.00%> (ø)
...apache/dubbo/admin/service/RegistryServerSync.java 80.55% <0.00%> (+5.55%) ⬆️
.../java/org/apache/dubbo/admin/common/util/Tool.java 15.78% <0.00%> (+15.78%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 888863a...57ac6c4. Read the comment docs.

Copy link
Contributor

@haoyann haoyann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KeRan213539 KeRan213539 merged commit 2578af0 into apache:develop Oct 13, 2021
KeRan213539 added a commit that referenced this pull request Nov 18, 2021
* set branch protection

* rat exclude ".asf.yaml"

* add master-0.2.0 to branch protection

* Exclude the".flattened-pom.xml" file into the source package (#799)

* Update copyright year (#801)

* fix NPE in ServiceTestUtil.java (#804)

* polish dockerfile for 0.3.0 (#805)

* update dockerfile and enable autotest

* fix test script

* fix zookeeper version

* fix rat

* develop-for-dubbo-3.x branch merge to develop branch (#808)

* [3.0]Add mesh rule route (#789)

* add mesh rule route

* add mesh rule check

* For #756 (#791)

* [ISSUE #760]Application discover support (#807)

* application discover support

* fix checkstyle

* fix ci

* remove useless pom import,modify Chinese comment

* fix UT bug

Co-authored-by: haoyann <[email protected]>
Co-authored-by: Aaron-boom <[email protected]>

* Fix generic invoke fail (#810)

* fix generic invoke fail

* fix ci

* Nacos support application discover (#812)

* Fix generic can't invoke repeatedly (#814)

* Reduce nacos mapping service storage (#817)

* optimize some code for RegistryServerSync (#822)

* Fix circular reference (#823)

* Fix service version spell (#824)

* For #756 (#815)

* For #756

* for 830 (#832)

* for 830

* For 830

* For 830

* For 830

* For 830

* For 830

* [Feature] Dubbo Admin provides service mock ability. (#838)

* commit the API

* develop the front page.

* add edit logic

* develop the front page and test.

* ui change

* change the config key and group

* change rule enable to config center.

* update GlobalMockRule update logic.

* remove the GlobalMockRule

* [feature admin mock] move the diver dependency out of the project.

* [feature admin mock] remove the contributor name and date in javadoc.

* [feature admin mock] optimize the delete mock rule step.

* [feature admin mock] fix the dialog cannot be closed when delete successfully.

* [feature admin mock] add the support for h2 database.

* [feature admin mock] rollback to zookeeper registry.

* [feature admin mock] fix properties.

* [feature admin mock] change mock-admin-api maven version.

* [feature admin mock] fix the feedback and add the parameters in docker-compose.

* [feature admin mock] fix the ci problem.

* [feature admin mock] fix the ci problem.

* [feature admin mock] removed unused import.

* [feature admin mock] add license.

* GovernanceConfiguration use dubbo instead DynamicConfiguration (#840)

* GovernanceConfiguration use dubbo instead DynamicConfiguration

* remove useless change

Co-authored-by: wuwen <[email protected]>
Co-authored-by: Huang YunKun <[email protected]>
Co-authored-by: haoyann <[email protected]>
Co-authored-by: Aaron-boom <[email protected]>
Co-authored-by: Wang Chengming <[email protected]>
Co-authored-by: brotherlu-xcq <[email protected]>
KeRan213539 added a commit that referenced this pull request Oct 9, 2022
* set branch protection

* rat exclude ".asf.yaml"

* add master-0.2.0 to branch protection

* Exclude the".flattened-pom.xml" file into the source package (#799)

* Update copyright year (#801)

* fix NPE in ServiceTestUtil.java (#804)

* polish dockerfile for 0.3.0 (#805)

* update dockerfile and enable autotest

* fix test script

* fix zookeeper version

* fix rat

* develop-for-dubbo-3.x branch merge to develop branch (#808)

* [3.0]Add mesh rule route (#789)

* add mesh rule route

* add mesh rule check

* For #756 (#791)

* [ISSUE #760]Application discover support (#807)

* application discover support

* fix checkstyle

* fix ci

* remove useless pom import,modify Chinese comment

* fix UT bug

Co-authored-by: haoyann <[email protected]>
Co-authored-by: Aaron-boom <[email protected]>

* Fix generic invoke fail (#810)

* fix generic invoke fail

* fix ci

* Nacos support application discover (#812)

* Fix generic can't invoke repeatedly (#814)

* Reduce nacos mapping service storage (#817)

* optimize some code for RegistryServerSync (#822)

* Fix circular reference (#823)

* Fix service version spell (#824)

* For #756 (#815)

* For #756

* for 830 (#832)

* for 830

* For 830

* For 830

* For 830

* For 830

* For 830

* [Feature] Dubbo Admin provides service mock ability. (#838)

* commit the API

* develop the front page.

* add edit logic

* develop the front page and test.

* ui change

* change the config key and group

* change rule enable to config center.

* update GlobalMockRule update logic.

* remove the GlobalMockRule

* [feature admin mock] move the diver dependency out of the project.

* [feature admin mock] remove the contributor name and date in javadoc.

* [feature admin mock] optimize the delete mock rule step.

* [feature admin mock] fix the dialog cannot be closed when delete successfully.

* [feature admin mock] add the support for h2 database.

* [feature admin mock] rollback to zookeeper registry.

* [feature admin mock] fix properties.

* [feature admin mock] change mock-admin-api maven version.

* [feature admin mock] fix the feedback and add the parameters in docker-compose.

* [feature admin mock] fix the ci problem.

* [feature admin mock] fix the ci problem.

* [feature admin mock] removed unused import.

* [feature admin mock] add license.

* GovernanceConfiguration use dubbo instead DynamicConfiguration (#840)

* GovernanceConfiguration use dubbo instead DynamicConfiguration

* remove useless change

* for release 0.4.0 (#850)

* [ISSUE #856] update README.md (#857)

* 修复更新,删除service类型的条件路由异常的问题 (#861)

* Fix flaky (#883)

* fix flaky test

* Delete dubbo-admin-server/.nondex directory

Co-authored-by: Ubuntu <rootadmin@vm001.qmx3d0w2ozeuflvliyjbpujvhf.bx.internal.cloudapp.net>

* support jdk11 #862 (#886)

* support jdk11 #862

* support jdk11 #862

Co-authored-by: 卫龙 <[email protected]>

* fix #895 (#896)

Co-authored-by: 卫龙 <[email protected]>

* fix #893 (#894)

fix #893

Co-authored-by: 卫龙 <[email protected]>

* Update index.html (#899)

原cdn.bootcss.com域名失效,需要切换到新域名cdn.bootcdn.net

官网申明:https://www.bootcdn.cn

* support swagger.enable (#902)

* support swagger.enable

* enable swagger by default

Co-authored-by: 璟源 <[email protected]>

* support dubbo 3.0.8 (#903)

* [Fix bug](#908) (#910)

* ZookeeperMetaDataCollector init method add zk digest acl support (#911)

* Fix notice and opt registry source (#913)

* update year

* fix search

* add relation support

* disable swagger

* Bump fastjson from 1.2.67 to 1.2.83 (#907)

Bumps [fastjson](https://github.com/alibaba/fastjson) from 1.2.67 to 1.2.83.
- [Release notes](https://github.com/alibaba/fastjson/releases)
- [Commits](alibaba/fastjson@1.2.67...1.2.83)

---
updated-dependencies:
- dependency-name: com.alibaba:fastjson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add seriialization & timeout (#914)

* update year

* fix search

* add relation support

* disable swagger

* fix interface

* fix interface

* 解决重复点功能,浏览器控制台报错问题,如点击:服务查询-搜索按钮 (#916)

* Fix error when host is null (#920)

* 解决重复点功能,浏览器控制台报错问题,如点击:服务查询-搜索按钮

* 解决可能产生的空指针问题,导致 '消费者'标签无法显示数据

* 解决在服务测试,方法执行成功后。动态生成的consumer元数据,host取值为空的问题情况(dubbo version 3.0.8)

* Update ServiceDetail.vue (#921)

* Up develop (#926)

* release 0.5.0

Co-authored-by: wuwen <[email protected]>
Co-authored-by: Huang YunKun <[email protected]>
Co-authored-by: haoyann <[email protected]>
Co-authored-by: Aaron-boom <[email protected]>
Co-authored-by: Wang Chengming <[email protected]>
Co-authored-by: brotherlu-xcq <[email protected]>
Co-authored-by: Robert LU <[email protected]>
Co-authored-by: ymybxx <[email protected]>
Co-authored-by: plzdoo <[email protected]>
Co-authored-by: Ubuntu <rootadmin@vm001.qmx3d0w2ozeuflvliyjbpujvhf.bx.internal.cloudapp.net>
Co-authored-by: chenjjl <[email protected]>
Co-authored-by: 卫龙 <[email protected]>
Co-authored-by: VirensCn <[email protected]>
Co-authored-by: itmajing <[email protected]>
Co-authored-by: 璟源 <[email protected]>
Co-authored-by: sherl0ckLiu <[email protected]>
Co-authored-by: sage.xue <[email protected]>
Co-authored-by: Albumen Kevin <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cnjxzhao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants