Skip to content

Commit

Permalink
build(deps): bump cn.dev33:sa-token-bom from 1.37.0 to 1.38.0 (#704)
Browse files Browse the repository at this point in the history
* build(deps): bump cn.dev33:sa-token-bom from 1.37.0 to 1.38.0

Bumps [cn.dev33:sa-token-bom](https://github.com/dromara/sa-token) from 1.37.0 to 1.38.0.
- [Release notes](https://github.com/dromara/sa-token/releases)
- [Commits](dromara/Sa-Token@v1.37.0...v1.38.0)

---
updated-dependencies:
- dependency-name: cn.dev33:sa-token-bom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* feat(sa-token): 升级sa-token

Signed-off-by: henry <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: henry <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: henry <[email protected]>
  • Loading branch information
dependabot[bot] and henry-hub authored May 12, 2024
1 parent c487838 commit 8844fd1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 36 deletions.
34 changes: 12 additions & 22 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
[versions]
hutool = '5.8.27'
hutool-v6 = '6.0.0-M11'
hutool-v5 = '5.8.27'
hutool = '6.0.0-M12'
mapstruct = '1.5.5.Final'
fastjson = '2.0.50'
spring-boot = '3.2.5'
spring-cloud = '2023.0.1'
spring-cloud-alibaba = '2023.0.1.0'
spring-boot-admin = '3.2.3'

[libraries]
# bom libs
ihub-integration-bom = { module = 'pub.ihub.integration:ihub-bom', version = '0.1.3' }
ihub-module-bom = { module = 'pub.ihub.module:ihub-bom', version = '0.1.1' }
hutool-bom = { module = 'cn.hutool:hutool-bom', version.ref = 'hutool' }
hutool-v6-bom = { module = 'org.dromara.hutool:hutool-bom', version.ref = 'hutool-v6' }
hutool-v5-bom = { module = 'cn.hutool:hutool-bom', version.ref = 'hutool-v5' }
hutool-bom = { module = 'org.dromara.hutool:hutool-bom', version.ref = 'hutool' }
jmolecules-bom = { module = 'org.jmolecules:jmolecules-bom', version = '2023.1.3' }
mybatis-plus-bom = { module = 'com.baomidou:mybatis-plus-bom', version = '3.5.6' }
spring-modulith-bom = { module = 'org.springframework.modulith:spring-modulith-bom', version = '1.1.4' }
spock-bom = { module = 'org.spockframework:spock-bom', version = '2.3-groovy-4.0' }
sa-token-bom = { module = 'cn.dev33:sa-token-bom', version = '1.37.0' }
sa-token-bom = { module = 'cn.dev33:sa-token-bom', version = '1.38.0' }
okio-bom = { module = 'com.squareup.okio:okio-bom', version = '3.9.0' }
guava-bom = { module = 'com.google.guava:guava-bom', version = '33.2.0-jre' }
guice-bom = { module = 'com.google.inject:guice-bom', version = '7.0.0' }
axon-bom = { module = 'org.axonframework:axon-bom', version = '4.9.4' }
asm-bom = { module = 'org.ow2.asm:asm-bom', version = '9.7' }
spring-boot-admin-dependencies = { module = 'de.codecentric:spring-boot-admin-dependencies', version.ref = 'spring-boot-admin' }
spring-cloud-dependencies = { module = 'org.springframework.cloud:spring-cloud-dependencies', version.ref = 'spring-cloud' }
spring-cloud-alibaba-dependencies = { module = 'com.alibaba.cloud:spring-cloud-alibaba-dependencies', version.ref = 'spring-cloud-alibaba' }
spring-boot-dependencies = { module = 'org.springframework.boot:spring-boot-dependencies', version.ref = 'spring-boot' }
dante-cloud-dependencies = { module = 'cn.herodotus.engine:dependencies', version = '3.2.5.3' }
quarkus-dependencies = { module = 'io.quarkus:quarkus-bom', version = '3.10.0' }
springdoc-openapi-dependencies = { module = 'org.springdoc:springdoc-openapi', version = '2.5.0' }

# log libs
commons-logging = { module = 'commons-logging:commons-logging' }
Expand Down Expand Up @@ -80,25 +77,18 @@ spring-boot-starter-test = { module = 'org.springframework.boot:spring-boot-star
pmd = { module = 'com.alibaba.p3c:p3c-pmd', version = '2.1.1' }

# other libs
hutool-all = { module = 'cn.hutool:hutool-all', version.ref = 'hutool' }
hutool-v6-all = { module = 'org.dromara.hutool:hutool-all', version.ref = 'hutool-v6' }
fastjson = { module = 'com.alibaba.fastjson2:fastjson2', version.ref = 'fastjson' }
fastjson-extension = { module = 'com.alibaba.fastjson2:fastjson2-extension', version.ref = 'fastjson' }
fastjson-extension-spring = { module = 'com.alibaba.fastjson2:fastjson2-extension-spring6', version.ref = 'fastjson' }
fastjson-kotlin = { module = 'com.alibaba.fastjson2:fastjson2-kotlin', version.ref = 'fastjson' }
fastjson1 = { module = 'com.alibaba:fastjson', version.ref = 'fastjson' }
justauth = { module = 'me.zhyd.oauth:JustAuth', version = '1.16.6' }
hutool-v5-all = { module = 'cn.hutool:hutool-all', version.ref = 'hutool-v5' }
hutool-all = { module = 'org.dromara.hutool:hutool-all', version.ref = 'hutool' }

[bundles]
platform = [
'ihub-integration-bom', 'ihub-module-bom', 'hutool-v6-bom',
'hutool-bom', 'jmolecules-bom', 'spock-bom', 'sa-token-bom', 'okio-bom', 'asm-bom', 'guava-bom', 'guice-bom',
'ihub-integration-bom', 'ihub-module-bom', 'hutool-bom',
'hutool-v5-bom', 'jmolecules-bom', 'spock-bom', 'sa-token-bom', 'okio-bom', 'asm-bom', 'guava-bom', 'guice-bom',
'mybatis-plus-bom', 'spring-modulith-bom', 'axon-bom', 'spring-boot-admin-dependencies', 'spring-cloud-dependencies',
'spring-cloud-alibaba-dependencies', 'spring-boot-dependencies', 'quarkus-dependencies', 'springdoc-openapi-dependencies'
'spring-boot-dependencies', 'dante-cloud-dependencies', 'quarkus-dependencies'
]
constraints = [
'hutool-all', 'hutool-v6-all', 'fastjson', 'fastjson-extension', 'fastjson-extension-spring', 'fastjson-kotlin', 'fastjson1', 'pmd',
'spock-reports', 'mapstruct', 'mapstruct-processor', 'justauth'
'hutool-v5-all', 'hutool-all', 'pmd', 'spock-reports', 'mapstruct', 'mapstruct-processor'
]
groovy = [
'groovy-core', 'groovy-datetime', 'groovy-dateutil', 'groovy-groovydoc', 'groovy-json',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 the original author or authors.
* Copyright (c) 2022-2024 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.
Expand All @@ -16,7 +16,7 @@
package pub.ihub.sso.client;

import cn.dev33.satoken.filter.SaServletFilter;
import cn.dev33.satoken.sso.SaSsoProcessor;
import cn.dev33.satoken.sso.processor.SaSsoClientProcessor;
import cn.hutool.core.builder.GenericBuilder;
import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
Expand Down Expand Up @@ -47,7 +47,7 @@ public class SsoClientAutoConfiguration {
@Bean
public Filter ssoFilter() {
return (ServletRequest request, ServletResponse response, FilterChain chain) -> {
Object object = SaSsoProcessor.instance.clientDister();
Object object = SaSsoClientProcessor.instance.dister();
if (object instanceof String) {
response.getWriter().write(object.toString());
}
Expand Down
4 changes: 2 additions & 2 deletions ihub-sso/server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 the original author or authors.
* Copyright (c) 2023-2024 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.
Expand All @@ -23,7 +23,7 @@ dependencies {
implementation("cn.hutool:hutool-all")

// 第三方登录组件
implementation(libs.justauth)
implementation("me.zhyd.oauth:JustAuth")

// 前端页面静态资源
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 the original author or authors.
* Copyright (c) 2022-2024 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.
Expand All @@ -15,9 +15,9 @@
*/
package pub.ihub.sso.server;

import cn.dev33.satoken.config.SaSsoConfig;
import cn.dev33.satoken.context.SaHolder;
import cn.dev33.satoken.sso.SaSsoProcessor;
import cn.dev33.satoken.sso.config.SaSsoServerConfig;
import cn.dev33.satoken.sso.processor.SaSsoServerProcessor;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.captcha.CaptchaUtil;
import cn.hutool.captcha.ICaptcha;
Expand Down Expand Up @@ -64,7 +64,7 @@ public class SsoServerController {
*/
@RequestMapping("/sso/*")
public Object ssoRequest() {
return SaSsoProcessor.instance.serverDister();
return SaSsoServerProcessor.instance.dister();
}

/**
Expand Down Expand Up @@ -122,17 +122,17 @@ public void captcha() throws IOException {
}

@Autowired
private void configSso(SaSsoConfig cfg, @Autowired(required = false) List<SsoLoginTicketHandle> ticketHandles,
private void configSso(SaSsoServerConfig cfg, @Autowired(required = false) List<SsoLoginTicketHandle> ticketHandles,
SsoUserDetailsService<?> userService) {
cfg.setNotLoginView(() -> new ModelAndView("login.html", new HashMap<>(4) {{
cfg.notLoginView = () -> new ModelAndView("login.html", new HashMap<>(4) {{
put("title", ssoProperties.getTitle());
put("copyright", ssoProperties.getCopyright());
put("icon", ssoProperties.getIcon());
put("socialAuths", ssoProperties.getAuthSource());
put("captchaEnabled", captchaProperties.isEnabled());
}}));
}});

cfg.setDoLoginHandle((name, pwd) -> {
cfg.doLoginHandle = (name, pwd) -> {
// 前置检查用于一些额外认证,如:验证码
if (ObjectUtil.isNotEmpty(ticketHandles)) {
try {
Expand Down Expand Up @@ -164,7 +164,7 @@ private void configSso(SaSsoConfig cfg, @Autowired(required = false) List<SsoLog
return Result.error("账号或者密码错误!");
}
return Result.error("登录失败!");
});
};
}

private AuthRequest getAuthRequest(String source) {
Expand Down

0 comments on commit 8844fd1

Please sign in to comment.