Package org.keycloak.userprofile
Class ServiceAccountAttributes
java.lang.Object
java.util.AbstractMap<K,V>
 
java.util.HashMap<String,List<String>>
 
org.keycloak.userprofile.DefaultAttributes
org.keycloak.userprofile.ServiceAccountAttributes
- All Implemented Interfaces:
- Serializable,- Cloneable,- Map<String,,- List<String>> - Attributes
A specific Attributes implementation to handle service accounts.
 
Service accounts are not regular users, and it should be possible to manage unmanaged attributes but only when
 operating through the UserProfileContext.USER_API. Otherwise, administrators will be forced to enable unmanaged
 attributes by setting a UPConfig.UnmanagedAttributePolicy or
 end up defining managed attributes that are specific for service accounts in the user profile configuration, which is
 mainly targeted for regular users.
- Author:
- Pedro Igor
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> 
- 
Field SummaryFields inherited from class org.keycloak.userprofile.DefaultAttributescontext, DEFAULT_MAX_LENGTH_ATTRIBUTES, READ_ONLY_ATTRIBUTE_KEY, session, userFields inherited from interface org.keycloak.userprofile.AttributesEMPTY_VALUE
- 
Constructor SummaryConstructorsConstructorDescriptionServiceAccountAttributes(UserProfileContext context, Map<String, ?> attributes, UserModel user, UserProfileMetadata profileMetadata, KeycloakSession session) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected AttributeMetadataprotected booleanbooleanisReadOnly(String name) Checks whether an attribute is read-only.protected voidMethods inherited from class org.keycloak.userprofile.DefaultAttributesaddDefaultValidators, contains, createAttributeContext, get, getAnnotations, getMetadata, getReadable, getUnmanagedAttributes, getWritable, isIncludeAttributeIfNotProvided, isReadOnlyFromMetadata, isReadOnlyInternalAttribute, isRequired, isSupportedAttribute, nameSet, normalizeAttributeValues, toMap, validateMethods inherited from class java.util.HashMapclear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMapequals, hashCode, toStringMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.keycloak.userprofile.AttributesgetFirst
- 
Constructor Details- 
ServiceAccountAttributespublic ServiceAccountAttributes(UserProfileContext context, Map<String, ?> attributes, UserModel user, UserProfileMetadata profileMetadata, KeycloakSession session) 
 
- 
- 
Method Details- 
isReadOnlyDescription copied from interface:AttributesChecks whether an attribute is read-only.- Specified by:
- isReadOnlyin interface- Attributes
- Overrides:
- isReadOnlyin class- DefaultAttributes
- Parameters:
- name- the attribute name
- Returns:
- trueif the attribute is read-only. Otherwise,- false
 
- 
createUnmanagedAttributeMetadata- Overrides:
- createUnmanagedAttributeMetadatain class- DefaultAttributes
 
- 
isAllowUnmanagedAttributeprotected boolean isAllowUnmanagedAttribute()- Overrides:
- isAllowUnmanagedAttributein class- DefaultAttributes
 
- 
setUserName- Overrides:
- setUserNamein class- DefaultAttributes
 
 
-