Skip to content

Commit

Permalink
♻️ refactor(SecurityController.java): 移除未使用的导入和方法
Browse files Browse the repository at this point in the history
♻️ refactor(package.json): 更新版本号至 0.0.1
✨ feat(launch.json): 添加 Microsoft Edge 启动配置
  • Loading branch information
vnobo committed Jul 8, 2024
1 parent cbed6ad commit 64740bd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package com.platform.boot.security;

import com.platform.boot.commons.exception.RestServerException;
import com.platform.boot.commons.utils.BeanUtils;
import com.platform.boot.commons.utils.ContextUtils;
import com.platform.boot.security.core.AuthenticationToken;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.ReactiveSecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizedClientRepository;
Expand All @@ -19,8 +17,6 @@
import org.springframework.web.server.WebSession;
import reactor.core.publisher.Mono;

import java.util.Map;

/**
* @author <a href="https://github.com/vnobo">Alex bob</a>
*/
Expand All @@ -33,18 +29,11 @@ public class SecurityController {
private final PasswordEncoder passwordEncoder;
private final ServerOAuth2AuthorizedClientRepository clientRepository;

@GetMapping("/realms/issuer")
public Mono<Map<String,Object>> issuer(SecurityDetails principal) {
return ReactiveSecurityContextHolder.getContext().map(securityContext -> BeanUtils.beanToMap(securityContext
.getAuthentication().getDetails()));
}
@GetMapping("token")
public Mono<AuthenticationToken> token(WebSession session, Authentication authentication) {
return Mono.defer(() -> Mono.just(AuthenticationToken.build(session, authentication)));
}



@GetMapping("csrf")
public Mono<CsrfToken> csrfToken() {
return Mono.deferContextual((contextView) -> {
Expand Down
7 changes: 7 additions & 0 deletions ng-ui/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
},
{
"type": "msedge",
"request": "launch",
"name": "Launch Edge against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
}
]
}
4 changes: 2 additions & 2 deletions ng-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ng-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-ui",
"version": "0.0.0",
"version": "0.0.1",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down

0 comments on commit 64740bd

Please sign in to comment.