Skip to content

Commit

Permalink
Propagate Authentication request attributes to augmentor
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Jan 16, 2024
1 parent 71f020f commit 06ce769
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 06ce769

Please sign in to comment.