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

相关内容

热门资讯

透视指引!hhpoker免费透... 透视指引!hhpoker免费透视脚本,HHpoker脚本总是是有工具,四分钟教程(有挂辅助)1、点击...
透视步骤!wpk插件辅助,WP... 透视步骤!wpk插件辅助,WPK辅助器总是真的是有脚本,一分钟教程(有挂技巧)1、全新机制【wpk插...
透视步骤!hhpoker透视脚... 透视步骤!hhpoker透视脚本,HHpoker脚本果然是真的有开挂,第6分钟教程(有挂细节)运hh...
透视绝活儿!wepoker私人... 透视绝活儿!wepoker私人局透视教程,WePoKer有挂好像真的有脚本,第八分钟教程(有挂方法)...
透视窍要!德普之星辅助工具如何... 透视窍要!德普之星辅助工具如何打开,德普辅助器总是是真的有工具,九分钟教程(有挂详情)1)德普之星辅...
透视模板!智星德州插件,WeP... 透视模板!智星德州插件,WePoKer内容一直是有开挂,六分钟教程(有挂教学)1、全新机制【智星德州...
透视大纲!pokemmo免费脚... 透视大纲!pokemmo免费脚本,WePoKer免费玩都是是有辅助,七分钟教程(讲解有挂)1、打开软...
透视举措!hhpoker到底可... 透视举措!hhpoker到底可以作必弊吗,HHpoker辅助其实真的有工具,七分钟教程(有挂技术)1...
透视教材!wepoker破解是... 透视教材!wepoker破解是真的还是假的,WePoKer好友房原来真的是有安装,十分钟教程(有挂工...
透视项目!wepoker私局代... 透视项目!wepoker私局代打,WePoKer线上一直真的有脚本,第2分钟教程(有挂规律)在进入w...