Artifactory中与LDAP用户关联的组何时会被更新?
创始人
2024-11-11 01:00:30
0

Artifactory 中与 LDAP 用户关联的组会在用户登录时进行更新。以下是示例代码,以配置 Artifactory 与 LDAP 集成以及检查用户组是否已更新:

import org.artifactory.security.ArtifactoryAuthenticationFilter
import org.artifactory.security.ArtifactoryLdapAuthenticationProvider

// 配置 Artifactory 与 LDAP 集成
def ldapAuthProvider = ArtifactoryLdapAuthenticationProvider.create(params)

ArtifactoryAuthenticationFilter.addAuthenticationProvider(ldapAuthProvider)

// 绑定用户并检查其关联的组是否已更新
def userName = "user"
def password = "password"
def groups = []
def authentication = ldapAuthProvider.authenticate(userName, password)

if (authentication != null) {
    groups = authentication.getAuthorities().collect { it.getAuthority() }
}

println "用户 ${userName} 所在的组为: ${groups}"

相关内容

热门资讯

技术分享!wepoker网页版... 技术分享!wepoker网页版透视方法,wepoker-h5下载,真是有挂(有挂总结)一、可以开透视...
现就发布提示!wejoker私... 现就发布提示!wejoker私人辅助软件,智星德州有脚本吗,切实存在有挂(有挂攻略)所有人都在同一条...
玩家攻略!wepoker透视脚... 玩家攻略!wepoker透视脚本,wpk作弊是真的吗,果然是真的有挂(有挂技巧)1)辅助插件:进一步...
近期!we-poker软件,德... 近期!we-poker软件,德普之星有辅助软件吗,切实是有挂(有挂实锤)1、起透看视 德普之星有辅助...
技术分享!wpk作弊,wepo... 技术分享!wpk作弊,wepoker亲友圈有用吗,切实真的是有挂(有挂工具)该软件可以轻松地帮助玩家...
今年以来!wepoker怎么设... 今年以来!wepoker怎么设置盖牌,智星德州插件2024最新版,本来真的有挂(有挂规律)1、许多玩...
技巧辅助挂!hhpoker必备... 技巧辅助挂!hhpoker必备开挂,德扑软件,竟然存在有挂(有挂技巧)1、德扑软件辅助软件下载优化,...
科技介绍!wepoker有脚本... 科技介绍!wepoker有脚本吗,佛手大菠萝13道挂哪里,其实真的有挂(有挂方法)暗藏猫腻,小编详细...
最新消息!wepokerplu... 最新消息!wepokerplus辅助,德扑之星私人局透视,果然确实有挂(有人有挂)1)德扑之星私人局...
一分钟揭秘!黑侠破解wepok... 一分钟揭秘!黑侠破解wepoker,竞技联盟辅助插件,切实真的是有挂(有挂细节)1、该软件可以轻松地...