Search code examples
javaspring-securityshiro

Spring Security / Shiro and single-use code


We are developing an exam-application where access to the exam is granted by a single-use code.

So basicly we give a candidate a code, for example 'FG678', and this is his code to access the exam.

So the login-form should only have one field and if the User enters a correct single-use code then access is granted.

I could not find any information about such implementation of Spring Security or Shiro. Have anyone of you guys any info on how easy this would be to implement? If it is possible?

Or maybe even a link to a tutorial?

Thanks in advance!


Solution

  • I dont know about shiro, but for spring Securiy you can do it easilly. you just have to do your own login page and implement the class AuthenticationProvider and use it in your xml file