Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * JBoss, Home of Professional Open Source.
   * Copyright 2012 Red Hat, Inc., and individual contributors
   * as indicated by the @author tags.
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
 package io.undertow.servlet.api;
 import java.util.Set;

Stuart Douglas
 public class SecurityInfo<T extends SecurityInfoimplements Cloneable {

Equivalent to ServletSecurity.EmptyRoleSemantic but with an additional mode to require authentication but no role check.
     public enum EmptyRoleSemantic {

Permit access to the resource without requiring authentication or role membership.

Deny access to the resource regardless of the authentication state.

Mandate authentication but authorize access as no roles to check against.
     private volatile EmptyRoleSemantic emptyRoleSemantic = .;
     private final Set<StringrolesAllowed = new HashSet<String>();
         return ;
     public T setEmptyRoleSemantic(final EmptyRoleSemantic emptyRoleSemantic) {
         this. = emptyRoleSemantic;
         return (T)this;
         return ;
     public T setTransportGuaranteeType(final TransportGuaranteeType transportGuaranteeType) {
         this. = transportGuaranteeType;
         return (T) this;
     public T addRoleAllowed(final String role) {
         return (T) this;
     public T addRolesAllowed(final String ... roles) {
         return (T) this;
     public T addRolesAllowed(final Collection<Stringroles) {
         return (T) this;
     public Set<StringgetRolesAllowed() {
         return new HashSet<String>();
     public T clone() {
         final SecurityInfo info = createInstance();
         info.emptyRoleSemantic = ;
         info.transportGuaranteeType = ;
         return (T) info;
    protected T createInstance() {
        return (T) new SecurityInfo();
New to GrepCode? Check out our FAQ X