How to do Rest Authentication with JAX-RS

前端 未结 2 1652
北荒
北荒 2021-02-08 18:16

I am looking for some pointers on how to secure my rest root resource

@Path(\"/employee\")
public class EmployeeResource {

    @GET
    @Produces(\"text/html\"         


        
2条回答
  •  长情又很酷
    2021-02-08 18:49

    The way I know is to add to your webapp's web.xml. Minimally, I think you need to add:

    
    
    
        
        
             employee-related-urls
             
             /employee/*
        
    
        
        
             
             employee
        
    
        
        
             
             CONFIDENTIAL
        
    
    
    
    
        
        BASIC
        
        site
    
    

提交回复
热议问题