本文整理汇总了Java中com.atlassian.jira.user.UserDetails类的典型用法代码示例。如果您正苦于以下问题:Java UserDetails类的具体用法?Java UserDetails怎么用?Java UserDetails使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UserDetails类属于com.atlassian.jira.user包,在下文中一共展示了UserDetails类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: tryCreateOrUpdateUser
import com.atlassian.jira.user.UserDetails; //导入依赖的package包/类
@Override
protected Object tryCreateOrUpdateUser(String username) throws Exception {
if (saml2Config.getAutoCreateUserFlag()){
log.warn("Creating user account for " + username );
UserManager userManager = ComponentAccessor.getUserManager();
String fullName = credential.getAttributeAsString("cn");
String email = credential.getAttributeAsString("mail");
UserDetails newUserDetails = new UserDetails(username, username).withEmail(email);
ApplicationUser newUser = userManager.createUser(newUserDetails);
addUserToGroup(newUser);
return newUser;
} else {
// not allowed to auto-create user
log.error("User not found and auto-create disabled: " + username);
}
return null;
}
示例2: createUser
import com.atlassian.jira.user.UserDetails; //导入依赖的package包/类
@Override
public ApplicationUser createUser(final UserDetails arg0, final boolean arg1, final int arg2,
final Set<ApplicationKey> arg3) throws PermissionException, CreateException {
// TODO Auto-generated method stub
return null;
}
示例3: createUser
import com.atlassian.jira.user.UserDetails; //导入依赖的package包/类
@Override
public ApplicationUser createUser(final UserDetails arg0) throws CreateException, PermissionException {
// TODO Auto-generated method stub
return null;
}