Class AuthArg
java.lang.Object
org.apache.juneau.rest.server.auth.AuthArg
- All Implemented Interfaces:
RestOpArg
Resolves
@RestOp-method parameters that represent the authenticated Principal.
Matches any of:
- Parameter annotated with
Auth(any type). - Parameter typed as
Principalor any subtype (includingClaimsPrincipal).
Resolution pulls the Principal stashed by an upstream AuthN guard
(BearerTokenGuard / ApiKeyGuard) on the request attributes under
"juneau.principal". If the stashed value is missing or not assignable to
the requested parameter type,
Type-driven resolution lets a bare Principal parameter be filled without an annotation,
matching the Spring / Servlet convention; the Auth annotation is for clarity and for
disambiguating against another arg resolver that might otherwise claim the parameter.
See Also:
- Since:
- 10.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthArgcreate(ParameterInfo paramInfo) Static creator.resolve(RestOpSession opSession) Resolves the parameter object.
-
Constructor Details
-
AuthArg
Constructor.- Parameters:
paramInfo- The Java method parameter being resolved. Must not benull .
-
-
Method Details