keycloak
公開メンバ関数 | 静的公開メンバ関数 | 静的公開変数類 | 静的関数 | 静的非公開変数類 | 全メンバ一覧
org.keycloak.protocol.saml.mappers.GroupMembershipMapper クラス
org.keycloak.protocol.saml.mappers.GroupMembershipMapper の継承関係図
Inheritance graph
org.keycloak.protocol.saml.mappers.GroupMembershipMapper 連携図
Collaboration graph

公開メンバ関数

String getDisplayCategory ()
 
String getDisplayType ()
 
String getHelpText ()
 
List< ProviderConfigPropertygetConfigProperties ()
 
String getId ()
 
void transformAttributeStatement (AttributeStatementType attributeStatement, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, AuthenticatedClientSessionModel clientSession)
 
String getProtocol ()
 
void close ()
 
final ProtocolMapper create (KeycloakSession session)
 
void init (Config.Scope config)
 
void postInit (KeycloakSessionFactory factory)
 
default void validateConfig (KeycloakSession session, RealmModel realm, ProtocolMapperContainerModel client, ProtocolMapperModel mapperModel) throws ProtocolMapperConfigException
 
default int order ()
 

静的公開メンバ関数

static boolean useFullPath (ProtocolMapperModel mappingModel)
 
static ProtocolMapperModel create (String name, String samlAttributeName, String nameFormat, String friendlyName, boolean singleAttribute)
 

静的公開変数類

static final String PROVIDER_ID = "saml-group-membership-mapper"
 
static final String SINGLE_GROUP_ATTRIBUTE = "single"
 

静的関数

 [static initializer]
 

静的非公開変数類

static final List< ProviderConfigPropertyconfigProperties = new ArrayList<ProviderConfigProperty>()
 

詳解

著者
Bill Burke
バージョン
Revision
1

関数詳解

◆ [static initializer]()

org.keycloak.protocol.saml.mappers.GroupMembershipMapper.[static initializer] ( )
inlinestaticpackage

◆ close()

void org.keycloak.protocol.saml.mappers.AbstractSAMLProtocolMapper.close ( )
inlineinherited

org.keycloak.provider.Providerを実装しています。

39  {
40 
41  }

◆ create() [1/2]

final ProtocolMapper org.keycloak.protocol.saml.mappers.AbstractSAMLProtocolMapper.create ( KeycloakSession  session)
inlineinherited

org.keycloak.provider.ProviderFactory< T extends Provider >を実装しています。

44  {
45  throw new RuntimeException("UNSUPPORTED METHOD");
46  }

◆ create() [2/2]

static ProtocolMapperModel org.keycloak.protocol.saml.mappers.GroupMembershipMapper.create ( String  name,
String  samlAttributeName,
String  nameFormat,
String  friendlyName,
boolean  singleAttribute 
)
inlinestatic
148  {
149  ProtocolMapperModel mapper = new ProtocolMapperModel();
150  mapper.setName(name);
151  mapper.setProtocolMapper(PROVIDER_ID);
152  mapper.setProtocol(SamlProtocol.LOGIN_PROTOCOL);
153  Map<String, String> config = new HashMap<String, String>();
154  config.put(AttributeStatementHelper.SAML_ATTRIBUTE_NAME, samlAttributeName);
155  if (friendlyName != null) {
156  config.put(AttributeStatementHelper.FRIENDLY_NAME, friendlyName);
157  }
158  if (nameFormat != null) {
159  config.put(AttributeStatementHelper.SAML_ATTRIBUTE_NAMEFORMAT, nameFormat);
160  }
161  config.put(SINGLE_GROUP_ATTRIBUTE, Boolean.toString(singleAttribute));
162  mapper.setConfig(config);
163 
164  return mapper;
165  }
static final String SINGLE_GROUP_ATTRIBUTE
Definition: GroupMembershipMapper.java:42
static final String PROVIDER_ID
Definition: GroupMembershipMapper.java:41

◆ getConfigProperties()

List<ProviderConfigProperty> org.keycloak.protocol.saml.mappers.GroupMembershipMapper.getConfigProperties ( )
inline

org.keycloak.provider.ConfiguredProviderを実装しています。

105  {
106  return configProperties;
107  }
static final List< ProviderConfigProperty > configProperties
Definition: GroupMembershipMapper.java:44

◆ getDisplayCategory()

String org.keycloak.protocol.saml.mappers.GroupMembershipMapper.getDisplayCategory ( )
inline

org.keycloak.protocol.ProtocolMapperを実装しています。

90  {
91  return "Group Mapper";
92  }

◆ getDisplayType()

String org.keycloak.protocol.saml.mappers.GroupMembershipMapper.getDisplayType ( )
inline

org.keycloak.protocol.ProtocolMapperを実装しています。

95  {
96  return "Group list";
97  }

◆ getHelpText()

String org.keycloak.protocol.saml.mappers.GroupMembershipMapper.getHelpText ( )
inline

org.keycloak.provider.ConfiguredProviderを実装しています。

100  {
101  return "Group names are stored in an attribute value. There is either one attribute with multiple attribute values, or an attribute per group name depending on how you configure it. You can also specify the attribute name i.e. 'member' or 'memberOf' being examples.";
102  }

◆ getId()

String org.keycloak.protocol.saml.mappers.GroupMembershipMapper.getId ( )
inline

org.keycloak.provider.ProviderFactory< T extends Provider >を実装しています。

110  {
111  return PROVIDER_ID;
112  }
static final String PROVIDER_ID
Definition: GroupMembershipMapper.java:41

◆ getProtocol()

String org.keycloak.protocol.saml.mappers.AbstractSAMLProtocolMapper.getProtocol ( )
inlineinherited

org.keycloak.protocol.ProtocolMapperを実装しています。

34  {
35  return SamlProtocol.LOGIN_PROTOCOL;
36  }

◆ init()

void org.keycloak.protocol.saml.mappers.AbstractSAMLProtocolMapper.init ( Config.Scope  config)
inlineinherited

org.keycloak.provider.ProviderFactory< T extends Provider >を実装しています。

49  {
50  }

◆ order()

default int org.keycloak.provider.ProviderFactory< T extends Provider >.order ( )
inlineinherited

◆ postInit()

void org.keycloak.protocol.saml.mappers.AbstractSAMLProtocolMapper.postInit ( KeycloakSessionFactory  factory)
inlineinherited

org.keycloak.provider.ProviderFactory< T extends Provider >を実装しています。

53  {
54 
55  }

◆ transformAttributeStatement()

void org.keycloak.protocol.saml.mappers.GroupMembershipMapper.transformAttributeStatement ( AttributeStatementType  attributeStatement,
ProtocolMapperModel  mappingModel,
KeycloakSession  session,
UserSessionModel  userSession,
AuthenticatedClientSessionModel  clientSession 
)
inline

org.keycloak.protocol.saml.mappers.SAMLAttributeStatementMapperを実装しています。

120  {
121  String single = mappingModel.getConfig().get(SINGLE_GROUP_ATTRIBUTE);
122  boolean singleAttribute = Boolean.parseBoolean(single);
123 
124  boolean fullPath = useFullPath(mappingModel);
125  AttributeType singleAttributeType = null;
126  for (GroupModel group : userSession.getUser().getGroups()) {
127  String groupName;
128  if (fullPath) {
129  groupName = ModelToRepresentation.buildGroupPath(group);
130  } else {
131  groupName = group.getName();
132  }
133  AttributeType attributeType = null;
134  if (singleAttribute) {
135  if (singleAttributeType == null) {
136  singleAttributeType = AttributeStatementHelper.createAttributeType(mappingModel);
137  attributeStatement.addAttribute(new AttributeStatementType.ASTChoiceType(singleAttributeType));
138  }
139  attributeType = singleAttributeType;
140  } else {
141  attributeType = AttributeStatementHelper.createAttributeType(mappingModel);
142  attributeStatement.addAttribute(new AttributeStatementType.ASTChoiceType(attributeType));
143  }
144  attributeType.addAttributeValue(groupName);
145  }
146  }
static final String SINGLE_GROUP_ATTRIBUTE
Definition: GroupMembershipMapper.java:42
static boolean useFullPath(ProtocolMapperModel mappingModel)
Definition: GroupMembershipMapper.java:114

◆ useFullPath()

static boolean org.keycloak.protocol.saml.mappers.GroupMembershipMapper.useFullPath ( ProtocolMapperModel  mappingModel)
inlinestatic
114  {
115  return "true".equals(mappingModel.getConfig().get("full.path"));
116  }

◆ validateConfig()

default void org.keycloak.protocol.ProtocolMapper.validateConfig ( KeycloakSession  session,
RealmModel  realm,
ProtocolMapperContainerModel  client,
ProtocolMapperModel  mapperModel 
) throws ProtocolMapperConfigException
inlineinherited

Called when instance of mapperModel is created/updated for this protocolMapper through admin endpoint

引数
session
realm
clientclient or clientTemplate
mapperModel
例外
ProtocolMapperConfigExceptionif configuration provided in mapperModel is not valid

org.keycloak.protocol.saml.mappers.ScriptBasedMapper, org.keycloak.protocol.oidc.mappers.ScriptBasedOIDCProtocolMapper, org.keycloak.protocol.oidc.mappers.AbstractPairwiseSubMapperで実装されています。

46  {
47  };

メンバ詳解

◆ configProperties

final List<ProviderConfigProperty> org.keycloak.protocol.saml.mappers.GroupMembershipMapper.configProperties = new ArrayList<ProviderConfigProperty>()
staticprivate

◆ PROVIDER_ID

final String org.keycloak.protocol.saml.mappers.GroupMembershipMapper.PROVIDER_ID = "saml-group-membership-mapper"
static

◆ SINGLE_GROUP_ATTRIBUTE

final String org.keycloak.protocol.saml.mappers.GroupMembershipMapper.SINGLE_GROUP_ATTRIBUTE = "single"
static

このクラス詳解は次のファイルから抽出されました: