Class urn_perun_user_attribute_def_def_login_namespace
java.lang.Object
cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleAbstract
cz.metacentrum.perun.core.implApi.modules.attributes.UserAttributesModuleAbstract
cz.metacentrum.perun.core.impl.modules.attributes.urn_perun_user_attribute_def_def_login_namespace
- All Implemented Interfaces:
AttributesModuleImplApi
,UserAttributesModuleImplApi
- Direct Known Subclasses:
urn_perun_user_attribute_def_def_login_namespace_admin_meta
,urn_perun_user_attribute_def_def_login_namespace_bbmriid_persistent_shadow
,urn_perun_user_attribute_def_def_login_namespace_ceitec
,urn_perun_user_attribute_def_def_login_namespace_eduroam_vsup
,urn_perun_user_attribute_def_def_login_namespace_eduteams_acc_nickname
,urn_perun_user_attribute_def_def_login_namespace_eduteams_nickname
,urn_perun_user_attribute_def_def_login_namespace_einfra
,urn_perun_user_attribute_def_def_login_namespace_erasmus_username
,urn_perun_user_attribute_def_def_login_namespace_fenix_nickname
,urn_perun_user_attribute_def_def_login_namespace_lifescienceid_username
,urn_perun_user_attribute_def_def_login_namespace_mu_adm
,urn_perun_user_attribute_def_def_login_namespace_myaccessid_persistent_shadow
,urn_perun_user_attribute_def_def_login_namespace_researcher_access_persistent_shadow
,urn_perun_user_attribute_def_def_login_namespace_umbrellaid_persistent_shadow
,urn_perun_user_attribute_def_def_login_namespace_vsup
,UserPersistentShadowAttribute
public class urn_perun_user_attribute_def_def_login_namespace
extends UserAttributesModuleAbstract
implements UserAttributesModuleImplApi
Class for checking login uniqueness in the namespace and filling login value in namespace
- Author:
- Michal Prochazka <michalp@ics.muni.cz>, Slavek Licehammer <glory@ics.muni.cz>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkAttributeSemantics
(PerunSessionImpl sess, User user, Attribute attribute) Checks if the user's login is unique in the namespace organizationvoid
checkAttributeSyntax
(PerunSessionImpl sess, User user, Attribute attribute) Checks if the user's login is in the correct format and if it is permitted to usefillAttribute
(PerunSessionImpl perunSession, User user, AttributeDefinition attribute) Filling implemented for: - namespaces configured in /etc/perun/perun.properties as property: "perun.loginNamespace.generated" - You must create own attribute module for that namespace to define filling functionprotected StringBuilder
sha1HashCount
(User user, String domain) Generate unique ID as hexadecimal string representation of SHA1 digest from users ID and domain.Methods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.UserAttributesModuleAbstract
changedAttributeHook, getAnonymizedValue
Methods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleAbstract
getAttributeDefinition, getAuthorizedRoles, getDependencies, resolveVirtualAttributeValueChange
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleImplApi
getAttributeDefinition, getAuthorizedRoles, getDependencies, resolveVirtualAttributeValueChange
Methods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.UserAttributesModuleImplApi
changedAttributeHook, getAnonymizedValue
-
Field Details
-
generatedNamespaces
-
-
Constructor Details
-
urn_perun_user_attribute_def_def_login_namespace
public urn_perun_user_attribute_def_def_login_namespace()
-
-
Method Details
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSessionImpl sess, User user, Attribute attribute) throws WrongReferenceAttributeValueException, WrongAttributeAssignmentException Checks if the user's login is unique in the namespace organization- Specified by:
checkAttributeSemantics
in interfaceUserAttributesModuleImplApi
- Overrides:
checkAttributeSemantics
in classUserAttributesModuleAbstract
- Parameters:
sess
- PerunSessionuser
- User to check attribute forattribute
- Attribute to check value to- Throws:
InternalErrorException
WrongReferenceAttributeValueException
WrongAttributeAssignmentException
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSessionImpl sess, User user, Attribute attribute) throws WrongAttributeValueException Checks if the user's login is in the correct format and if it is permitted to use- Specified by:
checkAttributeSyntax
in interfaceUserAttributesModuleImplApi
- Overrides:
checkAttributeSyntax
in classUserAttributesModuleAbstract
- Parameters:
sess
- PerunSessionuser
- userattribute
- Attribute of the user- Throws:
InternalErrorException
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
fillAttribute
public Attribute fillAttribute(PerunSessionImpl perunSession, User user, AttributeDefinition attribute) throws WrongAttributeAssignmentException Filling implemented for: - namespaces configured in /etc/perun/perun.properties as property: "perun.loginNamespace.generated" - You must create own attribute module for that namespace to define filling function- Specified by:
fillAttribute
in interfaceUserAttributesModuleImplApi
- Overrides:
fillAttribute
in classUserAttributesModuleAbstract
- Parameters:
perunSession
- PerunSessionuser
- User to fill attribute forattribute
- Attribute to fill value to- Returns:
- Filled attribute
- Throws:
InternalErrorException
WrongAttributeAssignmentException
-
sha1HashCount
Generate unique ID as hexadecimal string representation of SHA1 digest from users ID and domain. Input is salted per Perun instance. Effective resulting string consist of [0-9a-f] characters.It is used to generate unique IDs for ProxyIdP login namespaces.
- Parameters:
user
- User to generate ID fordomain
- Login namespace domain, eg. @einfra.cesnet.cz or @bbmri.eu etc.- Returns:
- Builder to get string ID
- Throws:
InternalErrorException
- When generation fails
-