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}"

相关内容

热门资讯

2024教程!智星菠萝德州辅助... 2024教程!智星菠萝德州辅助挂多功能透视工具,切实是有挂(了解有挂)1、每一步都需要思考,不同水平...
分享给玩家!AAPoKer辅助... 分享给玩家!AAPoKer辅助挂多功能透视工具,一直真的是有挂(详细教程)1、打开软件启动之后找到中...
揭秘攻略!智星菠萝德州辅助挂多... 揭秘攻略!智星菠萝德州辅助挂多功能透视工具,总是是真的有挂(有挂方针)1、每一步都需要思考,不同水平...
一起来探讨!红龙poker辅助... 一起来探讨!红龙poker辅助挂多功能透视工具,一直是有挂(有挂方法)1.红龙poker 选牌创建新...
终于清楚!wepoker辅助挂... 终于清楚!wepoker辅助挂多功能透视工具,竟然有挂(有挂分享)wepoker能透视中分为三种模型...
一分钟揭秘!微扑克辅助挂多功能... 一分钟揭秘!微扑克辅助挂多功能透视工具,竟然是真的有挂(有人有挂)1、打开软件启动之后找到中间准星的...
科技揭秘!wpk辅助挂多功能透... 科技揭秘!wpk辅助挂多功能透视工具,确实是真的有挂(有挂解惑)1、实时wpk透视辅助更新:用户可以...
让我来分享经验!红龙poker... 让我来分享经验!红龙poker辅助挂多功能透视工具,好像存在有挂(有挂规律)亲,关键说明,红龙pok...
关于!wepoker辅助挂多功... 关于!wepoker辅助挂多功能透视工具,好像有挂(存在有挂)1、每一步都需要思考,不同水平的挑战w...
重大通报!wepoker辅助挂... 重大通报!wepoker辅助挂多功能透视工具,真是真的是有挂(果真有挂)在进入wepoker软件靠谱...