本文整理汇总了Python中org.xdi.util.ArrayHelper.addItemToStringArray方法的典型用法代码示例。如果您正苦于以下问题:Python ArrayHelper.addItemToStringArray方法的具体用法?Python ArrayHelper.addItemToStringArray怎么用?Python ArrayHelper.addItemToStringArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.xdi.util.ArrayHelper
的用法示例。
在下文中一共展示了ArrayHelper.addItemToStringArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: updateClient
# 需要导入模块: from org.xdi.util import ArrayHelper [as 别名]
# 或者: from org.xdi.util.ArrayHelper import addItemToStringArray [as 别名]
def updateClient(self, registerRequest, client, configurationAttributes):
print "Client registration. UpdateClient method"
redirectUris = client.getRedirectUris()
print "Client registration. Redirect Uris:", redirectUris
addAddressScope = False
for redirectUri in redirectUris:
if (StringHelper.equalsIgnoreCase(redirectUri, "https://client.example.com/example1")):
addAddressScope = True
break
print "Client registration. Is add address scope:", addAddressScope
if (addAddressScope):
currentScopes = client.getScopes()
print "Client registration. Current scopes:", currentScopes
addressScope = self.scopeService.getScopeByDisplayName("address")
newScopes = ArrayHelper.addItemToStringArray(currentScopes, addressScope.getDn())
print "Client registration. Result scopes:", newScopes
client.setScopes(newScopes)
return True