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

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

本文整理了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

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

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

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

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

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

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

@Override
public Authentication authenticate(final Authentication authentication) {
  final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication;
  final IWindowsIdentity windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials()
      .toString());
  WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(),
      windowsIdentity.getSidString());
  if (!this.allowGuestLogin && windowsIdentity.isGuest()) {
    WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn());
    throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn());
  }
  final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat,
      this.roleFormat);
  WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString());
  final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal,
      this.grantedAuthorityFactory, this.defaultGrantedAuthority);
  WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn());
  return token;
}

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

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

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

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

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

@Override
public Authentication authenticate(final Authentication authentication) {
  final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication;
  IWindowsIdentity windowsIdentity;
  try {
    windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials().toString());
  } catch (final Win32Exception e) {
    throw new AuthenticationServiceException(e.getMessage(), e);
  }
  WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(),
      windowsIdentity.getSidString());
  if (!this.allowGuestLogin && windowsIdentity.isGuest()) {
    WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn());
    throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn());
  }
  final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat,
      this.roleFormat);
  WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString());
  final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal,
      this.grantedAuthorityFactory, this.defaultGrantedAuthority);
  WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn());
  return token;
}

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

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

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

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

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

@Override
public Authentication authenticate(final Authentication authentication) {
  final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication;
  IWindowsIdentity windowsIdentity;
  try {
    windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials().toString());
  } catch (final Win32Exception e) {
    throw new AuthenticationServiceException(e.getMessage(), e);
  }
  WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(),
      windowsIdentity.getSidString());
  if (!this.allowGuestLogin && windowsIdentity.isGuest()) {
    WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn());
    throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn());
  }
  final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat,
      this.roleFormat);
  WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString());
  final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal,
      this.grantedAuthorityFactory, this.defaultGrantedAuthority);
  WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn());
  return token;
}

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

@Override
public Authentication authenticate(final Authentication authentication) {
  final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication;
  IWindowsIdentity windowsIdentity;
  try {
    windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials().toString());
  } catch (final Win32Exception e) {
    throw new AuthenticationServiceException(e.getMessage(), e);
  }
  WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(),
      windowsIdentity.getSidString());
  if (!this.allowGuestLogin && windowsIdentity.isGuest()) {
    WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn());
    throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn());
  }
  final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat,
      this.roleFormat);
  WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString());
  final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal,
      this.grantedAuthorityFactory, this.defaultGrantedAuthority);
  WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn());
  return token;
}

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

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

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

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

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

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

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

相关文章