What's the “principal” in Spring Security?

后端 未结 2 1109
故里飘歌
故里飘歌 2020-12-23 10:56

I\'m really new to Spring and Spring Security. I was reading about Spring Security and it came out the concept of principal, which should be the current logged user

2条回答
  •  盖世英雄少女心
    2020-12-23 11:35

    Brief definition of Principal:

    A Principal represents a user's identity.

    It can be a String object having username on a simple level or a complex UserDetails object.

提交回复
热议问题