[java-identity-provider] branch main updated: Syntax cleanup.
Scott Cantor
cantor.2 at osu.edu
Tue Feb 28 17:17:43 UTC 2023
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=6d4e46b8c91928d34d95a90a9e6046410c5f0f09
The following commit(s) were added to refs/heads/main by this push:
new 6d4e46b8c Syntax cleanup.
6d4e46b8c is described below
commit 6d4e46b8c91928d34d95a90a9e6046410c5f0f09
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Feb 28 12:17:39 2023 -0500
Syntax cleanup.
---
.../config/logic/IncludeAttributeStatementPredicate.java | 3 ++-
.../navigate/DefaultNameIdentifierFormatStrategy.java | 13 +++----------
.../impl/SAML2AuthnRequestsSignedSecurityHandler.java | 5 ++---
3 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/logic/IncludeAttributeStatementPredicate.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/logic/IncludeAttributeStatementPredicate.java
index 4ef8885a4..85ab57100 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/logic/IncludeAttributeStatementPredicate.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/logic/IncludeAttributeStatementPredicate.java
@@ -22,6 +22,7 @@ import java.util.function.Function;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import net.shibboleth.idp.saml.profile.config.BrowserSSOProfileConfiguration;
import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate;
@@ -75,7 +76,7 @@ public class IncludeAttributeStatementPredicate extends AbstractRelyingPartyPred
if (rpc != null) {
final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof net.shibboleth.idp.saml.profile.config.BrowserSSOProfileConfiguration sso) {
+ if (pc instanceof BrowserSSOProfileConfiguration sso) {
return sso.isIncludeAttributeStatement(input);
} else if (pc instanceof net.shibboleth.saml.saml1.profile.config.AttributeQueryProfileConfiguration) {
return true;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/context/navigate/DefaultNameIdentifierFormatStrategy.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/context/navigate/DefaultNameIdentifierFormatStrategy.java
index ac0e999c6..7eaafb3c3 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/context/navigate/DefaultNameIdentifierFormatStrategy.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/context/navigate/DefaultNameIdentifierFormatStrategy.java
@@ -24,6 +24,7 @@ import java.util.function.Function;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import net.shibboleth.idp.saml.profile.config.BrowserSSOProfileConfiguration;
import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
@@ -122,16 +123,8 @@ public class DefaultNameIdentifierFormatStrategy extends MetadataNameIdentifierF
profileConfig = relyingPartyCtx.getProfileConfig();
}
- if (profileConfig
- instanceof net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration) {
- fromConfig.addAll(
- ((net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration) profileConfig)
- .getNameIDFormatPrecedence(input));
- log.debug("Configuration specifies the following formats: {}", fromConfig);
- } else if (profileConfig instanceof
- net.shibboleth.idp.saml.profile.config.BrowserSSOProfileConfiguration sso) {
- fromConfig.addAll(
- sso.getNameIDFormatPrecedence(input));
+ if (profileConfig instanceof BrowserSSOProfileConfiguration sso) {
+ fromConfig.addAll(sso.getNameIDFormatPrecedence(input));
log.debug("Configuration specifies the following formats: {}", fromConfig);
} else {
log.debug("No ProfileConfiguraton available (or not a BrowserSSOProfileConfiguration)");
diff --git a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/messaging/impl/SAML2AuthnRequestsSignedSecurityHandler.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/messaging/impl/SAML2AuthnRequestsSignedSecurityHandler.java
index 06481b20d..f96d6ba69 100644
--- a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/messaging/impl/SAML2AuthnRequestsSignedSecurityHandler.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/messaging/impl/SAML2AuthnRequestsSignedSecurityHandler.java
@@ -60,9 +60,8 @@ public class SAML2AuthnRequestsSignedSecurityHandler
if (messageContext.getParent() instanceof ProfileRequestContext) {
final RelyingPartyContext rpCtx = relyingPartyContextLookupStrategy.apply(
(ProfileRequestContext) messageContext.getParent());
- if (rpCtx != null && rpCtx.getProfileConfig() instanceof BrowserSSOProfileConfiguration) {
- return ((BrowserSSOProfileConfiguration) rpCtx.getProfileConfig()).isRequireSignedRequests(
- (ProfileRequestContext) messageContext.getParent());
+ if (rpCtx.getProfileConfig() instanceof BrowserSSOProfileConfiguration sso) {
+ return sso.isRequireSignedRequests((ProfileRequestContext) messageContext.getParent());
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list