Skip to content

Commit

Permalink
WT-11496: fix not or not properly implemented setters in Saml::Service
Browse files Browse the repository at this point in the history
I noticed that certain functions were not implemented in
`Saml::Service`. I added a proper implementation for
setNameIdPolicyAllowCreate (must set it to the provided
allowCreate argument and setAuthnContextComparison
(this function's implementation was missing entirely).
  • Loading branch information
RockinRoel committed Apr 18, 2023
1 parent 20199dd commit bc472e5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
10 changes: 10 additions & 0 deletions ReleaseNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ <h2>Release 4.9.2 (TBD)</h2>
<a href="https://redmine.webtoolkit.eu/issues/11433" target="_blank">Issue #11433</a>:
fixed a regression in the treeview-dragdrop example where dropping a file on the folder view was not working anymore.
</li>
<li>
<a href="https://redmine.webtoolkit.eu/issues/11496" target="_blank">Issue #11496</a>:
<a href="classWt_1_1Auth_1_1Saml_1_1Service.html">Saml::Service</a>:
added missing implementation for
<a
href="classWt_1_1Auth_1_1Saml_1_1Service.html#ae6be709a6ebc43302425da239622c05b">setAuthnContextComparison()</a>
and properly implemented
<a
href="classWt_1_1Auth_1_1Saml_1_1Service.html#aa5cca89e64b80cc66fcff8f64fda4360">setNameIdPolicyAllowCreate()</a>.
</li>
</ul>

<h2>Release 4.9.1 (January 20, 2023)</h2>
Expand Down
7 changes: 6 additions & 1 deletion src/Wt/Auth/Saml/Service.C
Original file line number Diff line number Diff line change
Expand Up @@ -309,14 +309,19 @@ void Service::setNameIdPolicyFormat(const std::string &format)

void Service::setNameIdPolicyAllowCreate(bool allowCreate)
{
nameIdPolicyAllowCreate_ = true;
nameIdPolicyAllowCreate_ = allowCreate;
}

void Service::setAuthnContextClassRef(const std::string &authnContextClassRef)
{
authnContextClassRef_ = authnContextClassRef;
}

void Service::setAuthnContextComparison(Wt::Auth::Saml::AuthnContextComparison comparison)
{
authnContextComparison_ = comparison;
}

void Service::setSPEntityId(const std::string &entityID)
{
spEntityId_ = entityID;
Expand Down
2 changes: 1 addition & 1 deletion src/Wt/Auth/Saml/Service.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class WT_API Service {

/*! \brief Sets the AllowCreate parameter for the name id policy in the authentication request.
*
* This detauls to true.
* This defaults to true.
*
* \sa setNameIdPolicyFormat()
*/
Expand Down

0 comments on commit bc472e5

Please # to comment.