principalOrNull

Authenticated principal for the current typed route, or null when authentication is optional and no principal was resolved.

Use this property inside authenticateWithOptional route blocks. For required authentication, prefer principal.

Report a problem