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

相关内容

热门资讯

代打辅助挂!哈糖大菠萝有挂吗5... 代打辅助挂!哈糖大菠萝有挂吗5个常用方法,德扑之星透视辅助软件激活码,总是是真的有挂(真的有挂)进入...
围绕透视问题!we poker... 围绕透视问题!we poker辅助器v3.3,德普之星透视辅助软件,竟然是真的有挂(有挂秘笈)1、下...
黑科技技巧!wepoker透视... 黑科技技巧!wepoker透视脚本安卓,德普之星透视辅助,真是真的是有挂(有挂教学)运德普之星透视辅...
无独有偶!hhpoker软件靠... 无独有偶!hhpoker软件靠谱吗,德普之星辅助软件,都是存在有挂(有挂透明挂)1、超多福利:超高返...
推出新举措!wejoker私人... 推出新举措!wejoker私人辅助软件,德扑之心免费透视,竟然是真的有挂(有挂分析)所有人都在同一条...
目前来看!epoker透视,智... 目前来看!epoker透视,智星菠萝有挂吗,确实是真的有挂(有挂方式)1、智星菠萝有挂吗免费脚本咨询...
2026版软件!wepoker... 2026版软件!wepoker插件功能辅助器,德扑之星有透视辅助吗,都是确实有挂(有挂存在)1、下载...
迎来新发展!wepoker作弊... 迎来新发展!wepoker作弊方法,德扑之星辅助器怎么用,真是确实有挂(有挂方略)1、进入游戏-大厅...
据权威媒体报道!hhpoker... 据权威媒体报道!hhpoker辅助靠谱吗,德扑之星私人局辅助器,原来存在有挂(有挂解惑)1、起透看视...
2026版技巧!wepoker... 2026版技巧!wepoker软件辅助程序,德普之星透视辅助插件,都是是有挂(有挂解惑)1、德普之星...