rocketraman
04/05/2023, 5:07 PMAuthenticationContext.principal
is now deprecated. What if I don't know the provider of my principals and I just want to get a list of them? That doesn't seem possible anymore?Aleksei Tirman [JB]
04/05/2023, 8:24 PMrocketraman
04/05/2023, 8:26 PMfun AuthenticationContext.somePrincipal(): Principal? =
principal<JWTPrincipal>()
?: principal<MyCustomPrincipal>()
?: principal<AnonymousPrincipal>()
but that seems to be more work than is necessary when before I could just do:
when(val principal = authentication.principal) {
...
}
authentication.principal<Principal>()