waffle.servlet.WindowsPrincipal.getPrincipalNames()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(192)

本文整理了Java中waffle.servlet.WindowsPrincipal.getPrincipalNames()方法的一些代码示例,展示了WindowsPrincipal.getPrincipalNames()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WindowsPrincipal.getPrincipalNames()方法的具体详情如下:
包路径:waffle.servlet.WindowsPrincipal
类名称:WindowsPrincipal
方法名:getPrincipalNames

WindowsPrincipal.getPrincipalNames介绍

[英]Returns a list of user principal objects.
[中]返回用户主体对象的列表。

代码示例

代码示例来源:origin: Waffle/waffle

  1. /**
  2. * Gets the roles.
  3. *
  4. * @param windowsIdentity
  5. * the windows identity
  6. * @param principalFormat
  7. * the principal format
  8. * @param roleFormat
  9. * the role format
  10. * @return the roles
  11. */
  12. private static List<String> getRoles(final IWindowsIdentity windowsIdentity, final PrincipalFormat principalFormat,
  13. final PrincipalFormat roleFormat) {
  14. final List<String> roles = new ArrayList<>();
  15. roles.addAll(WindowsPrincipal.getPrincipalNames(windowsIdentity, principalFormat));
  16. for (final IWindowsAccount group : windowsIdentity.getGroups()) {
  17. roles.addAll(WindowsPrincipal.getRoleNames(group, roleFormat));
  18. }
  19. return roles;
  20. }

代码示例来源:origin: com.github.dblock.waffle/waffle-jna

  1. /**
  2. * Gets the roles.
  3. *
  4. * @param windowsIdentity
  5. * the windows identity
  6. * @param principalFormat
  7. * the principal format
  8. * @param roleFormat
  9. * the role format
  10. * @return the roles
  11. */
  12. private static List<String> getRoles(final IWindowsIdentity windowsIdentity, final PrincipalFormat principalFormat,
  13. final PrincipalFormat roleFormat) {
  14. final List<String> roles = new ArrayList<>();
  15. roles.addAll(WindowsPrincipal.getPrincipalNames(windowsIdentity, principalFormat));
  16. for (final IWindowsAccount group : windowsIdentity.getGroups()) {
  17. roles.addAll(WindowsPrincipal.getRoleNames(group, roleFormat));
  18. }
  19. return roles;
  20. }

代码示例来源:origin: com.github.waffle/waffle-jna

  1. /**
  2. * Gets the roles.
  3. *
  4. * @param windowsIdentity
  5. * the windows identity
  6. * @param principalFormat
  7. * the principal format
  8. * @param roleFormat
  9. * the role format
  10. * @return the roles
  11. */
  12. private static List<String> getRoles(final IWindowsIdentity windowsIdentity, final PrincipalFormat principalFormat,
  13. final PrincipalFormat roleFormat) {
  14. final List<String> roles = new ArrayList<>();
  15. roles.addAll(WindowsPrincipal.getPrincipalNames(windowsIdentity, principalFormat));
  16. for (final IWindowsAccount group : windowsIdentity.getGroups()) {
  17. roles.addAll(WindowsPrincipal.getRoleNames(group, roleFormat));
  18. }
  19. return roles;
  20. }

相关文章