Skip to content

Convenience method for getting Subject #130

Description

@arjantijms

The Subject (representing the authenticated identity) is currently obtained in Jakarta Authorization in the following way:

 Subject subject;
        try {
            subject = (Subject) PolicyContext.getContext("javax.security.auth.Subject.container");
        } catch (PolicyContextException ex) {
            throw new RuntimeException(ex);
        }

We could for convenience and for ease of readability in the using code add a getSubject() method to PolicyContext

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions