How to do Basic Authentication of a resource in Dropwizard

前端 未结 2 698
后悔当初
后悔当初 2020-12-08 08:15

I believe I have basic authentication working but I\'m not sure how to protect resources so that they can only be accessed when the user is signed in.

publi         


        
2条回答
  •  情歌与酒
    2020-12-08 08:50

    Sorry for being a simple user . I believe you can protect the resource by using a @Auth User user

    public Service1Bean Service1Method1(
        @Auth User user,
        @QueryParam("name") com.google.common.base.Optional name) {
    

提交回复
热议问题