1
0
mirror of synced 2026-08-04 17:27:13 +00:00

Allow Creating RelyingPartyRegistration from Metadata InputStream

Update SAML2 Login reference documentation to reflect the changes

Closes gh-9558
This commit is contained in:
Marcus Hert da Coregio
2021-05-14 13:46:29 -03:00
committed by Marcus Hert Da Coregio
parent 58ebacc06f
commit 6474a9e76e
3 changed files with 84 additions and 4 deletions
@@ -536,7 +536,6 @@ RelyingPartyRegistration relyingPartyRegistration = RelyingPartyRegistrations
.registrationId("my-id")
.build();
----
.Kotlin
[source,kotlin,role="secondary"]
----
@@ -547,6 +546,20 @@ val relyingPartyRegistration = RelyingPartyRegistrations
----
====
Note that you can also create a `RelyingPartyRegistration` from an arbitrary `InputStream` source.
One such example is when the metadata is stored in a database:
[source,java]
----
String xml = fromDatabase();
try (InputStream source = new ByteArrayInputStream(xml.getBytes())) {
RelyingPartyRegistration relyingPartyRegistration = RelyingPartyRegistrations
.fromMetadata(source)
.registrationId("my-id")
.build();
}
----
Though a more sophisticated setup is also possible, like so:
====