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

How can reactive programming be enabled for key-cache? #289

Open
MarcGiffing opened this issue Apr 8, 2024 Discussed in #286 · 1 comment
Open

How can reactive programming be enabled for key-cache? #289

MarcGiffing opened this issue Apr 8, 2024 Discussed in #286 · 1 comment
Milestone

Comments

@MarcGiffing
Copy link
Owner

Discussed in #286

Originally posted by dwang2 April 7, 2024
I have developed a reactive security service to retrieve the current user's name using the code snippet provided below. How can I formulate a key-cache expression to asynchronously fetch the username

@service
public class SecurityService {

public Mono<String> username() {
	return ReactiveSecurityContextHolder.getContext()
			.map(securityContext -> {
				Authentication authentication = securityContext.getAuthentication();
				return authentication != null ? authentication.getName() : null;
			});
}

}

@MarcGiffing MarcGiffing added this to the 0.12.7 milestone Apr 8, 2024
@dwang2
Copy link

dwang2 commented Apr 15, 2024

Given that we are using Spring version 2.7.x, could you please extend support to version 0.8.x as well? This aligns with the current version I'm using.

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

No branches or pull requests

2 participants