Skip to content

Commit 754dcc2

Browse files
committed
Improve configuration readability of the primary-identifier plugin
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 497aa9c commit 754dcc2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

example/plugins/microservices/primary_identifier.yaml.example

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,24 @@ config:
2222
- attribute_names: [eppn]
2323
- attribute_names: [name_id]
2424
name_id_format: urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
25-
# The line below addes the IdP entityID to the value for the SAML2
25+
# The line below adds the IdP entityID to the value for the SAML2
2626
# Persistent NameID to ensure the value is fully scoped.
2727
add_scope: issuer_entityid
2828
- attribute_names: [edupersontargetedid]
2929
add_scope: issuer_entityid
30+
3031
# The internal SATOSA attribute into which to place the primary
3132
# identifier value once found from the above configured ordered
3233
# candidates.
3334
primary_identifier: uid
35+
3436
# Whether or not to clear the input attributes after setting the
3537
# primary identifier value.
3638
clear_input_attributes: no
39+
3740
# Whether to replace subject_id with the constructed primary identifier
3841
replace_subject_id: no
42+
3943
# If defined redirect to this page if no primary identifier can
4044
# be found.
4145
on_error: https://my.org/errors/no_primary_identifier

src/satosa/micro_services/primary_identifier.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def constructPrimaryIdentifier(self, data, ordered_identifier_candidates):
6262
# name_id_format add the value for the NameID of that format if it was asserted by the IdP
6363
# or else add the value None.
6464
if 'name_id' in candidate['attribute_names']:
65-
candidate_nameid_value = None
6665
candidate_nameid_value = None
6766
candidate_name_id_format = candidate.get('name_id_format')
6867
name_id_value = data.subject_id

0 commit comments

Comments
 (0)