Skip to content

Commit

Permalink
Merge pull request #40 from michalvavrik/feature/add-auth-context-att…
Browse files Browse the repository at this point in the history
…ributes-to-augmentor

Add AuthenticationRequest attributes to AuthenticationRequestContext so that users can access RoutingContext
  • Loading branch information
stuartwdouglas authored Jan 17, 2024
2 parents 71f020f + 06ce769 commit 4c04d40
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import io.smallrye.mutiny.Uni;

import java.util.Map;

/**
* An interface that allows for a {@link SecurityIdentity} to be modified after creation.
* <p>
Expand All @@ -26,4 +28,17 @@ default int priority() {
* @return A completion stage that will resolve to the modified identity
*/
Uni<SecurityIdentity> augment(SecurityIdentity identity, AuthenticationRequestContext context);


/**
* Augments a security identity to allow for modification of the underlying identity.
*
* @param identity The identity
* @param context A context object that can be used to run blocking tasks
* @param attributes All the authentication request attributes
* @return A completion stage that will resolve to the modified identity
*/
default Uni<SecurityIdentity> augment(SecurityIdentity identity, AuthenticationRequestContext context, Map<String, Object> attributes) {
return augment(identity, context);
}
}

0 comments on commit 4c04d40

Please sign in to comment.