@@ -77,24 +77,28 @@ settings.idp_slo_service_binding = :redirect
7777
7878For clarity, the default value of both parameters is ` :redirect ` if they are not set.
7979
80- ### Addition of Settings sp_uuid_prefix and removal of Utils::UUID_PREFIX
80+ ### Change to message UUID prefix customization
8181
82- By default, the ` uuid ` (aliased to ` request_id ` / ` response_id ` ) method in ` RubySaml::Authrequest ` ,
83- ` RubySaml::Logoutrequest ` , and ` RubySaml::Logoutresponse ` uses the ` _ ` character as a default prefix,
84- for example ` _a1b3c5d7-9f1e-3d5c-7b1a-9f1e3d5c7b1a ` . In RubySaml, versions prior to ` 2.0.0 ` , it was
85- possible to change this default prefix by either calling ` RubySaml::Utils.set_prefix ` or by mutating
82+ On SP-originated messages ( ` Authrequest ` , ` Logoutrequest ` , ` Logoutresponse ` ), RubySaml generates the
83+ ` uuid ` (aliased to ` request_id ` / ` response_id ` ) using the ` _ ` character as a default prefix,
84+ for example ` _a1b3c5d7-9f1e-3d5c-7b1a-9f1e3d5c7b1a ` . In RubySaml versions prior to ` 2.0.0 ` , it was
85+ possible to change this default prefix by either ` RubySaml::Utils.set_prefix ` or by mutating
8686the ` RubySaml::Utils::UUID_PREFIX ` constant (which was what ` .set_prefix ` did.) In RubySaml ` 2.0.0 ` ,
8787this prefix is now set using ` settings.sp_uuid_prefix ` :
8888
8989``` ruby
9090# Change the default prefix from `_` to `my_id_`
9191settings.sp_uuid_prefix = ' my_id_'
92+
93+ # Create the AuthNRequest message
94+ request = RubySaml ::Authrequest .new
95+ request.create(settings)
96+ request.uuid # => "my_id_a1b3c5d7-9f1e-3d5c-7b1a-9f1e3d5c7b1a"
9297```
9398
94- A side-effect of this change is that the ` uuid ` (aliased to ` request_id ` / ` response_id ` ) method in
95- ` RubySaml::Authrequest ` , ` RubySaml::Logoutrequest ` , and ` RubySaml::Logoutresponse ` now is ` nil ` until
96- the ` #create ` method is called. Previously, it was generated automatically during object instantiation.
97- After calling ` #create ` for the first time the UUID will not change, even if a ` Settings ` object with
99+ A side-effect of this change is that the ` uuid ` of the ` Authrequest ` , ` Logoutrequest ` , and ` Logoutresponse `
100+ classes now is ` nil ` until the ` #create ` method is called (previously, it was set in the constructor.)
101+ After calling ` #create ` for the first time the ` uuid ` will not change, even if a ` Settings ` object with
98102a different ` sp_uuid_prefix ` is passed-in on subsequent calls.
99103
100104### Deprecation of compression settings
0 commit comments