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轻量版辅助,wpk德州局透视,模板教程(有挂方针)wepoker轻量版辅...
七分钟辅助!wepoker透视... 七分钟辅助!wepoker透视最简单三个步骤,aapoker透视脚本入口,妙计教程(有挂秘籍)1、许...
四分钟辅助!佛手在线大菠萝辅助... 四分钟辅助!佛手在线大菠萝辅助,wepoker有透视底牌吗,演示教程(有挂规律)1、金币登录送、破产...
六分钟辅助!德普之星透视,po... 六分钟辅助!德普之星透视,pokerworld修改器,课程教程(竟然有挂)1、不需要AI权限,帮助你...
七分钟辅助!wepoker私人... 七分钟辅助!wepoker私人局辅助器怎么用,hh poker辅助器先试用,总结教程(有挂分享)1、...
一分钟辅助!wepoker插件... 一分钟辅助!wepoker插件辅助,wepoker有透视吗,课程教程(有挂技巧)1、wepoker插...
5分钟辅助!xpoker辅助助... 5分钟辅助!xpoker辅助助手,wepoker游戏的安装教程,办法教程(真的有挂)1、上手简单,内...
第一分钟辅助!steampok... 第一分钟辅助!steampokermaster辅助,hhpoker透视脚本视频,秘籍教程(有挂分享)...
第五分钟辅助!wepoker辅... 第五分钟辅助!wepoker辅助器官方,wepoker辅助器安装包定制,总结教程(有挂透明挂)1、进...
六分钟辅助!wpk透视辅助靠谱... 六分钟辅助!wpk透视辅助靠谱吗,线上德州的辅助器是什么,机巧教程(真的有挂)1、操作简单,无需线上...