code: @SuppressWarnings("PMD.AvoidLiteralsInIfCondition")
      public Token getAuthorizationToken(final ContainerRequest request) {
          String authorizationString = request.getHeaderString("Authorization");
          if (authorizationString != null && !"".equals(authorizationString)) {
              authorizationString = authorizationString.trim();
              final String[] components = authorizationString.split("\\s");
              if (components.length != 2) {
                  throw new NotAuthorizedException(authenticationType);
              }
              final String scheme = components[0];
              if (!authenticationType.equalsIgnoreCase(scheme)) {
                  throw new NotAuthorizedException(authenticationType);
              }
              final String tokenString = components[1];
              return Token.fromString(tokenString);
          }
          return null;
      }
docs: Extract a Fernet token from an RFC6750 Authorization header.
  
  @param request a REST request which may or may not include an RFC6750 Authorization header.
  @return a Fernet token or null if no RFC6750 Authorization header is provided.