org.glassfish.grizzly.http.server.Request.getUserPrincipal()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(205)

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

Request.getUserPrincipal介绍

[英]Return the principal that has been authenticated for this Request.
[中]返回已为此请求进行身份验证的主体。

代码示例

代码示例来源:origin: jersey/jersey

  1. @Override
  2. public Principal getUserPrincipal() {
  3. return request.getUserPrincipal();
  4. }

代码示例来源:origin: javaee/grizzly

  1. @Override
  2. public Principal getUserPrincipal(Packet request) {
  3. return this.request.getUserPrincipal();
  4. }

代码示例来源:origin: org.glassfish.jersey.containers/jersey-container-grizzly2-http

  1. @Override
  2. public Principal getUserPrincipal() {
  3. return request.getUserPrincipal();
  4. }

代码示例来源:origin: javaee/grizzly

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public java.security.Principal getUserPrincipal() {
  6. if (request == null) {
  7. throw new IllegalStateException("Null request object");
  8. }
  9. return request.getUserPrincipal();
  10. }

代码示例来源:origin: javaee/grizzly

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public java.security.Principal getUserPrincipal() {
  6. if (request == null) {
  7. throw new IllegalStateException("Null request object");
  8. }
  9. return request.getUserPrincipal();
  10. }

代码示例来源:origin: javaee/grizzly

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public java.security.Principal getUserPrincipal() {
  6. if (request == null) {
  7. throw new IllegalStateException("Null request object");
  8. }
  9. return request.getUserPrincipal();
  10. }

代码示例来源:origin: javaee/grizzly

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public java.security.Principal getUserPrincipal() {
  6. if (request == null) {
  7. throw new IllegalStateException("Null request object");
  8. }
  9. return request.getUserPrincipal();
  10. }

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public java.security.Principal getUserPrincipal() {
  6. if (request == null) {
  7. throw new IllegalStateException("Null request object");
  8. }
  9. return request.getUserPrincipal();
  10. }

代码示例来源:origin: javaee/grizzly

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public java.security.Principal getUserPrincipal() {
  6. if (request == null) {
  7. throw new IllegalStateException("Null request object");
  8. }
  9. return request.getUserPrincipal();
  10. }

代码示例来源:origin: org.glassfish.main.admin/admin-util

  1. public AdminCallbackHandler(
  2. final ServiceLocator serviceLocator,
  3. final Request request,
  4. final String alternateHostName,
  5. final String defaultAdminUsername,
  6. final LocalPassword localPassword) throws IOException {
  7. this.serviceLocator = serviceLocator;
  8. this.request = request;
  9. this.defaultAdminUsername = defaultAdminUsername;
  10. this.localPassword = localPassword;
  11. clientPrincipal = request.getUserPrincipal();
  12. originHost = alternateHostName != null ? alternateHostName : request.getRemoteHost();
  13. passwordAuthentication = basicAuth();
  14. specialAdminIndicator = specialAdminIndicator();
  15. token = token();
  16. }

相关文章

Request类方法