Skip to content

Commit

Permalink
refactor(auth/satoken): JWT 配置支持启用/关闭
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Feb 5, 2024
1 parent 2afb0b6 commit c33a670
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ protected static class SaTokenDaoAutoConfiguration {
*/
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(prefix = "sa-token.extension", name = "enableJwt", havingValue = "true")
public StpLogic stpLogic() {
return new StpLogicJwtForSimple();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public class SaTokenExtensionProperties {
*/
private boolean enabled = false;

/**
* 启用 JWT
*/
private boolean enableJwt = false;

/**
* 持久层配置
*/
Expand All @@ -54,6 +59,14 @@ public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

public boolean isEnableJwt() {
return enableJwt;
}

public void setEnableJwt(boolean enableJwt) {
this.enableJwt = enableJwt;
}

public SaTokenDaoProperties getDao() {
return dao;
}
Expand Down

0 comments on commit c33a670

Please sign in to comment.