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

相关内容

热门资讯

分辨真假!智星菠萝德州辅助挂多... 分辨真假!智星菠萝德州辅助挂多功能透视工具,竟然真的有挂(有挂细节)1、每一步都需要思考,不同水平的...
关于!wepoker辅助挂多功... 关于!wepoker辅助挂多功能透视工具,一直是真的有挂(真的有挂)1、wepoker透视辅助软件激...
一分钟了解!微扑克辅助挂多功能... 一分钟了解!微扑克辅助挂多功能透视工具,本来真的是有挂(有挂规律)1、该软件可以轻松地帮助玩家将微扑...
一起来探讨!aapoker辅助... 一起来探讨!aapoker辅助挂多功能透视工具,都是真的有挂(有挂方式)亲,关键说明,aapoker...
重要通知!wepoker辅助挂... 重要通知!wepoker辅助挂多功能透视工具,切实真的是有挂(确实有挂)1、wepoker破解器简单...
分辨真假!微扑克辅助挂多功能透... 分辨真假!微扑克辅助挂多功能透视工具,其实真的是有挂(有挂辅助)1、微扑克免费脚本咨询教程、微扑克免...
盘点一款!aapoker辅助挂... 盘点一款!aapoker辅助挂多功能透视工具,果然是有挂(有挂分析)1、起透看视 aapoker辅助...
玩家必备科普!红龙poker辅... 玩家必备科普!红龙poker辅助挂多功能透视工具,真是有挂(有挂规律)1、首先打开红龙poker辅助...
一秒答解!智星德州扑克辅助挂多... 一秒答解!智星德州扑克辅助挂多功能透视工具,其实是真的有挂(有挂辅助)1、该软件可以轻松地帮助玩家将...
避坑细节!WPK辅助挂多功能透... 避坑细节!WPK辅助挂多功能透视工具,竟然真的有挂(有挂技巧)WPK透视方法中分为三种模型:WPK靠...