How can I use swagger-ui based on user roles?

430 views
Skip to first unread message

harsh dubey

unread,
Dec 10, 2015, 4:27:42 AM12/10/15
to Swagger
Hello ,

I have a requirement where I want to list the apis in swagger based on user roles.

For example :- User A with basic access can use limited apis.
User B with Admin access can use all the listed apis.

I don't know how to achieve this. I'm ready to write filter if we can do that as well.

I'm using below mentioned swagger version.

<dependency>
<groupId>com.mangofactory</groupId>
<artifactId>swagger-springmvc</artifactId>
<version>1.0.2</version>
</dependency>

Thanks,
Harsh

Ron

unread,
Dec 10, 2015, 4:09:29 PM12/10/15
to Swagger
Hi Harsh,

You're actually using a really old version of the project.
The project since migrated and changed its name to springfox - I'd strongly suggest upgrading to their latest version.

As for being able to filter based on roles, that should be a functionality in the producing end, so check their docs to see if they offer it.
Reply all
Reply to author
Forward
0 new messages