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

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

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

WindowsPrincipal.<init>介绍

[英]A windows principal.
[中]一位windows校长。

代码示例

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

  1. this.roleFormat);
  2. } else {
  3. windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat);

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

  1. this.roleFormat);
  2. } else {
  3. windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat);

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

  1. this.roleFormat);
  2. } else {
  3. windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat);

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

  1. @Override
  2. public Authentication authenticate(final Authentication authentication) {
  3. final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication;
  4. final IWindowsIdentity windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials()
  5. .toString());
  6. WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(),
  7. windowsIdentity.getSidString());
  8. if (!this.allowGuestLogin && windowsIdentity.isGuest()) {
  9. WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn());
  10. throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn());
  11. }
  12. final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat,
  13. this.roleFormat);
  14. WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString());
  15. final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal,
  16. this.grantedAuthorityFactory, this.defaultGrantedAuthority);
  17. WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn());
  18. return token;
  19. }

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

  1. : new WindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat);

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

  1. this.principalFormat, this.roleFormat) : new WindowsPrincipal(windowsIdentity,
  2. this.principalFormat, this.roleFormat);

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

  1. @Override
  2. public Authentication authenticate(final Authentication authentication) {
  3. final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication;
  4. IWindowsIdentity windowsIdentity;
  5. try {
  6. windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials().toString());
  7. } catch (final Win32Exception e) {
  8. throw new AuthenticationServiceException(e.getMessage(), e);
  9. }
  10. WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(),
  11. windowsIdentity.getSidString());
  12. if (!this.allowGuestLogin && windowsIdentity.isGuest()) {
  13. WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn());
  14. throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn());
  15. }
  16. final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat,
  17. this.roleFormat);
  18. WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString());
  19. final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal,
  20. this.grantedAuthorityFactory, this.defaultGrantedAuthority);
  21. WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn());
  22. return token;
  23. }

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

  1. : new WindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat);

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

  1. : new WindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat);

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

  1. @Override
  2. public Authentication authenticate(final Authentication authentication) {
  3. final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication;
  4. IWindowsIdentity windowsIdentity;
  5. try {
  6. windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials().toString());
  7. } catch (final Win32Exception e) {
  8. throw new AuthenticationServiceException(e.getMessage(), e);
  9. }
  10. WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(),
  11. windowsIdentity.getSidString());
  12. if (!this.allowGuestLogin && windowsIdentity.isGuest()) {
  13. WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn());
  14. throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn());
  15. }
  16. final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat,
  17. this.roleFormat);
  18. WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString());
  19. final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal,
  20. this.grantedAuthorityFactory, this.defaultGrantedAuthority);
  21. WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn());
  22. return token;
  23. }

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

  1. @Override
  2. public Authentication authenticate(final Authentication authentication) {
  3. final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication;
  4. IWindowsIdentity windowsIdentity;
  5. try {
  6. windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials().toString());
  7. } catch (final Win32Exception e) {
  8. throw new AuthenticationServiceException(e.getMessage(), e);
  9. }
  10. WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(),
  11. windowsIdentity.getSidString());
  12. if (!this.allowGuestLogin && windowsIdentity.isGuest()) {
  13. WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn());
  14. throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn());
  15. }
  16. final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat,
  17. this.roleFormat);
  18. WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString());
  19. final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal,
  20. this.grantedAuthorityFactory, this.defaultGrantedAuthority);
  21. WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn());
  22. return token;
  23. }

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

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

  1. windowsIdentity.getSidString());
  2. final Principal principal = new WindowsPrincipal(windowsIdentity);
  3. token.setPrincipal(principal);

代码示例来源:origin: org.wso2.carbon.identity.application.auth.iwa.ntlm/org.wso2.carbon.identity.application.authenticator.iwa.ntlm

  1. windowsPrincipal = new AutoDisposableWindowsPrincipal(windowsIdentity, IWAServiceDataHolder.getInstance().getPrincipalFormat(), IWAServiceDataHolder.getInstance().getRoleFormat());
  2. } else {
  3. windowsPrincipal = new WindowsPrincipal(windowsIdentity, IWAServiceDataHolder.getInstance().getPrincipalFormat(), IWAServiceDataHolder.getInstance().getRoleFormat());

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.application.authenticator.iwa

  1. windowsPrincipal = new AutoDisposableWindowsPrincipal(windowsIdentity, IWAServiceDataHolder.getInstance().getPrincipalFormat(), IWAServiceDataHolder.getInstance().getRoleFormat());
  2. } else {
  3. windowsPrincipal = new WindowsPrincipal(windowsIdentity, IWAServiceDataHolder.getInstance().getPrincipalFormat(), IWAServiceDataHolder.getInstance().getRoleFormat());

相关文章