Class BearerTokenGuard.Builder
java.lang.Object
org.apache.juneau.rest.server.auth.BearerTokenGuard.Builder
- Enclosing class:
- BearerTokenGuard
Builder class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the guard.Sets theWWW-Authenticate: Bearer realm="<value>"challenge realm.validator(TokenValidator value) Sets the token validator the guard delegates to.
-
Constructor Details
-
Builder
protected Builder()Constructor.
-
-
Method Details
-
validator
Sets the token validator the guard delegates to.- Parameters:
value- The validator. Must not benull .- Returns:
- This object.
-
realm
Sets theWWW-Authenticate: Bearer realm="<value>"challenge realm.The realm string communicates to the client which protection space the credentials apply to. Defaults to
"api"when not set.- Parameters:
value- The realm. Must not benull or blank.- Returns:
- This object.
-
build
Builds the guard.- Returns:
- A new
BearerTokenGuard.
-