You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/servlet/saml2/metadata.adoc
+118-2Lines changed: 118 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,127 @@ Kotlin::
27
27
[source,kotlin,role="secondary"]
28
28
----
29
29
val details: OpenSamlAssertingPartyDetails =
30
-
registration.getAssertingPartyDetails() as OpenSamlAssertingPartyDetails;
31
-
val openSamlEntityDescriptor: EntityDescriptor = details.getEntityDescriptor();
30
+
registration.getAssertingPartyDetails() as OpenSamlAssertingPartyDetails
31
+
val openSamlEntityDescriptor: EntityDescriptor = details.getEntityDescriptor()
32
32
----
33
33
======
34
34
35
+
=== Using `AssertingPartyMetadataRepository`
36
+
37
+
You can also be more targeted than `RelyingPartyRegistrations` by using `AssertingPartyMetadataRepository`, an interface that allows for only retrieving the asserting party metadata.
38
+
39
+
This allows three valuable features:
40
+
41
+
* Implementations can refresh asserting party metadata in an expiry-aware fashion
42
+
* Implementations of `RelyingPartyRegistrationRepository` can more easily articulate a relationship between a relying party and its one or many corresponding asserting parties
43
+
* Implementations can verify metadata signatures
44
+
45
+
For example, `OpenSamlAssertingPartyMetadataRepository` uses OpenSAML's `MetadataResolver`, and API whose implementations regularly refresh the underlying metadata in an expiry-aware fashion.
46
+
47
+
This means that you can now create a refreshable `RelyingPartyRegistrationRepository` in just a few lines of code:
48
+
49
+
[tabs]
50
+
======
51
+
Java::
52
+
+
53
+
[source,java,role="primary"]
54
+
----
55
+
@Component
56
+
public class RefreshableRelyingPartyRegistrationRepository
You can also verify metadata signatures using `OpenSamlAssertingPartyMetadataRepository` by providing the appropriate set of ``Saml2X509Credential``s as follows:
Copy file name to clipboardExpand all lines: saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/metadata/OpenSamlSigningUtils.java
0 commit comments