VersioningCommitAuthor set to anonymous when principal is not an instance of UserDetails

Description

When doing feature creation and modification via WFS-T it looks like this workflow depends on Geoserver implicitly having the user account information outside of the WFS request.
When using cookie authentication Geoserver does get the correct user metadata from Geonode, however when using OAuth the user metadata is not (or doesn't seem to be) available, and the Author name is set to Anonymous.

While triaging this issue, it was identified that the code responsible for extracted the user principal expects it to be an instance of UserDetails and when using OAuth, the principal is set up as a String thus forcing Anonymous to be set as the VersioningCommitAuthor.

This is currently only relevant to GeoGig backed layers.

Environment

None

Assignee

Unassigned

Reporter

Clarence Davis

Triage

None

Fix versions

Affects versions

Priority

Medium
Configure