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

Spring reactive in CredentialRepository #380

Open
igorlogvin opened this issue Sep 19, 2024 · 5 comments
Open

Spring reactive in CredentialRepository #380

igorlogvin opened this issue Sep 19, 2024 · 5 comments

Comments

@igorlogvin
Copy link

Hello!
Our project is replacing regular spring with Spring Reactive (Mono, Flux, etc.). The yubico library does not support reactive contracts in the CredentialRepository. Is it possible to release a version on Reactive Spring?

@emlun
Copy link
Member

emlun commented Sep 20, 2024

Pardon my ignorance - what is a reactive contract? Is this related to #219 (asynchronous methods)?

@igorlogvin
Copy link
Author

igorlogvin commented Sep 20, 2024

Pardon my ignorance - what is a reactive contract? Is this related to #219 (asynchronous methods)?

No, it not what I mean.

https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html

In our case, we want to use Mono or Flux return in CredentialRepository interface methods. If it’s possible.

As example:

Mono<Set<PublicKeyCredentialDescriptor>> getCredentialIdsForUsername(String username);

@emlun
Copy link
Member

emlun commented Sep 20, 2024

Ok, that looks to me like another way to describe asynchronous programming. The Reactor docs even say so themselves:

Reactor [...] integrates directly with the Java 8 functional APIs, notably CompletableFuture [...]. It offers composable asynchronous sequence APIs — [...] Mono [...]

The reply in #219 still stands: this is not possible with the current CredentialRepository API; it is of course possible to release a new version that supports it, but it would be a major undertaking to refactor the API for it. In particular, we'd have to think hard about how to make it as widely compatible as possible so we don't lock it specifically to Spring, for example. On the bright side, we now have the experimental CredentialRepositoryV2 and related interfaces - they may be a good testing grounds for an async API.

As in #219 I'm still positive towards the idea, but I cannot promise any concrete timeline for this. You're more than welcome to contribute a proposal as a pull request if you'd like to help accelerate the effort.

@igorlogvin
Copy link
Author

Thanks for explaining. Hope this feature will created soon.

@igorlogvin igorlogvin reopened this Oct 16, 2024
@igorlogvin
Copy link
Author

Reopened for linked issues history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants