Skip to content

Commit

Permalink
add AttributeFetcher for freja_eid
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlundberg committed Aug 29, 2024
1 parent ad09eea commit ae6d56f
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/eduid/workers/am/ams/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
OrcidProofingUserDB,
PhoneProofingUserDB,
)
from eduid.userdb.proofing.db import BankIDProofingUserDB, LadokProofingUserDB, SvideIDProofingUserDB
from eduid.userdb.proofing.db import (
BankIDProofingUserDB,
LadokProofingUserDB,
SvideIDProofingUserDB,
FrejaEIDProofingUserDB,
)
from eduid.userdb.reset_password import ResetPasswordUserDB
from eduid.userdb.security import SecurityUserDB
from eduid.userdb.signup import SignupUserDB
Expand Down Expand Up @@ -311,3 +316,24 @@ class eduid_bankid(AttributeFetcher):
@classmethod
def get_user_db(cls, uri: str) -> BankIDProofingUserDB:
return BankIDProofingUserDB(uri)


class eduid_freja_eid(AttributeFetcher):
whitelist_set_attrs = [
"passwords",
"identities",
"givenName",
"chosen_given_name",
"surname",
"legal_name",
]
whitelist_unset_attrs: list[str] = [
"identities",
"chosen_given_name",
"nins", # Old format
"displayName", # deprecated
]

@classmethod
def get_user_db(cls, uri: str) -> FrejaEIDProofingUserDB:
return FrejaEIDProofingUserDB(uri)

0 comments on commit ae6d56f

Please sign in to comment.