Skip to content

Retrieving the Principal in a WebFlux Controller or Handler method always returning null #4790

@essh

Description

@essh

Summary

When attempting to retrieve the Principal in either a WebFlux Controller or Handler method (using the getPrincipal method) a null value is always returned, even when there is an authenticated user. This was working fine in 5.0.0.M5 but seems to have stopped working some time after so it currently affects 5.0.0.RC1 & BUILD-SNAPSHOT.

Actual Behavior

A null value is always returned for the Principal when using the getPrincipal method on either the ServerWebExchange or ServerRequest in a WebFlux Controller or Handler method even when there is an authenticated user.

Expected Behavior

A Principal object should be returned as it was in 5.0.0.M5 if there is an authenticated user.

Configuration

Default Spring Security & Boot auto configuration.

Version

Spring Security 5.0.0.RC1 & BUILD-SNAPSHOT
Spring Boot 2.0.0.BUILD-SNAPSHOT

Metadata

Metadata

Assignees

Labels

in: webAn issue in web modules (web, webmvc)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions