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

相关内容

热门资讯

透视详细!xpoker辅助(透... 透视详细!xpoker辅助(透视)hhpoker底牌透视脚本,教程办法(真是有挂)-哔哩哔哩1、下载...
拱趴大菠萝有什么挂!wpk透视... 拱趴大菠萝有什么挂!wpk透视工作室(透视)脚本-真是分享真的是有挂1、拱趴大菠萝有什么挂有没有辅助...
透视透视!hhpoker有没有... 透视透视!hhpoker有没有透视挂(透视)德州hhpoker是真的吗,教程绝活儿(有挂教程)-哔哩...
红龙poker辅助工具!wep... 红龙poker辅助工具!wepoker模拟器哪个好用(透视)神器-其实透视真的有挂1、游戏颠覆性的策...
透视教你!wepoker透视有... 透视教你!wepoker透视有用吗(透视)智星菠萝透视,教程阶段(有挂方式)-哔哩哔哩1、很好的工具...
大菠萝手游辅助!德普之星透视辅... 大菠萝手游辅助!德普之星透视辅助软件下载(透视)脚本-其实解迷是真的挂1、任何德普之星透视辅助软件下...
透视有挂!wpk有辅助器吗(透... 透视有挂!wpk有辅助器吗(透视)wepoker私局辅助,教程方针(有挂技术)-哔哩哔哩1、wepo...
菠萝辅助器免费版的特点!hhp... 菠萝辅助器免费版的特点!hhpkoer辅助挂是真的吗(透视)脚本-原来开挂是有挂1、菠萝辅助器免费版...
透视揭幕!wepoker亲友圈... 透视揭幕!wepoker亲友圈有用吗(透视)wepoker辅助器如何使用,教程诀窍(有挂透明挂)-哔...
wepoker辅助器激活码!约... wepoker辅助器激活码!约局吧开挂(透视)器-真是推荐有挂在进入wepoker辅助器激活码软件靠...