[java-identity-provider] branch main updated: Change context lookup to walk from PRC instead of AC.
Scott Cantor
cantor.2 at osu.edu
Tue May 21 15:00:23 UTC 2024
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=b65d766bd58048d58cc8592071c002b0e8dac39e
The following commit(s) were added to refs/heads/main by this push:
new b65d766bd Change context lookup to walk from PRC instead of AC.
b65d766bd is described below
commit b65d766bd58048d58cc8592071c002b0e8dac39e
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue May 21 11:00:20 2024 -0400
Change context lookup to walk from PRC instead of AC.
---
.../idp/authn/AbstractUsernamePasswordCredentialValidator.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractUsernamePasswordCredentialValidator.java b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractUsernamePasswordCredentialValidator.java
index f8a91e73b..efddf4741 100644
--- a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractUsernamePasswordCredentialValidator.java
+++ b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractUsernamePasswordCredentialValidator.java
@@ -58,7 +58,7 @@ public abstract class AbstractUsernamePasswordCredentialValidator extends Abstra
@Nonnull private final Logger log = LoggerFactory.getLogger(AbstractUsernamePasswordCredentialValidator.class);
/** Lookup strategy for UP context. */
- @Nonnull private Function<AuthenticationContext,UsernamePasswordContext> usernamePasswordContextLookupStrategy;
+ @Nonnull private Function<ProfileRequestContext,UsernamePasswordContext> usernamePasswordContextLookupStrategy;
/** Whether to save the password in the Java Subject's private credentials. */
private boolean savePasswordToCredentialSet;
@@ -79,8 +79,10 @@ public abstract class AbstractUsernamePasswordCredentialValidator extends Abstra
private boolean trim;
/** Constructor. */
+ @SuppressWarnings("null")
public AbstractUsernamePasswordCredentialValidator() {
- usernamePasswordContextLookupStrategy = new ChildContextLookup<>(UsernamePasswordContext.class);
+ usernamePasswordContextLookupStrategy = new ChildContextLookup<>(UsernamePasswordContext.class).compose(
+ new ChildContextLookup<>(AuthenticationContext.class));
transforms = CollectionSupport.emptyList();
@@ -95,7 +97,7 @@ public abstract class AbstractUsernamePasswordCredentialValidator extends Abstra
* @param strategy lookup strategy
*/
public void setUsernamePasswordContextLookupStrategy(
- @Nonnull final Function<AuthenticationContext,UsernamePasswordContext> strategy) {
+ @Nonnull final Function<ProfileRequestContext,UsernamePasswordContext> strategy) {
checkSetterPreconditions();
usernamePasswordContextLookupStrategy = Constraint.isNotNull(strategy,
"UsernamePasswordContextLookupStrategy cannot be null");
@@ -191,7 +193,7 @@ public abstract class AbstractUsernamePasswordCredentialValidator extends Abstra
@Nullable final ErrorHandler errorHandler) throws Exception {
checkComponentActive();
- final UsernamePasswordContext upContext = usernamePasswordContextLookupStrategy.apply(authenticationContext);
+ final UsernamePasswordContext upContext = usernamePasswordContextLookupStrategy.apply(profileRequestContext);
if (upContext == null) {
log.debug("{} No UsernamePasswordContext available", getLogPrefix());
if (errorHandler != null) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list