Allow Creating RelyingPartyRegistration from Metadata InputStream
Update SAML2 Login reference documentation to reflect the changes Closes gh-9558
This commit is contained in:
committed by
Marcus Hert Da Coregio
parent
58ebacc06f
commit
6474a9e76e
@@ -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:
|
||||
|
||||
====
|
||||
|
||||
Reference in New Issue
Block a user