Class McpStepUpAuthorizer.Builder
java.lang.Object
org.apache.juneau.rest.client.mcp.auth.McpStepUpAuthorizer.Builder
- Enclosing class:
- McpStepUpAuthorizer
Builder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccumulator(McpScopeAccumulator value) Sets the scope accumulator.attemptStepUp(boolean value) Whether to attempt step-up at all.build()Builds the authorizer.Sets the authorization server issuer.maxAttempts(int value) Sets the hard cap on re-authorization attempts per(resource, operation)before a permanent failure.previouslyRequestedScopes(String... values) Seeds the scope accumulator with the client's previously-requested scopes so the first union preserves them.Sets the re-authorization callback invoked with the widened scope union.Sets the RFC 8707 resource indicator this authorizer tracks attempts for.
-
Constructor Details
-
Builder
protected Builder()Constructor.
-
-
Method Details
-
resource
Sets the RFC 8707 resource indicator this authorizer tracks attempts for. Required.- Parameters:
value- The resource URI.- Returns:
- This object.
-
issuer
Sets the authorization server issuer. Required.- Parameters:
value- The issuer URI.- Returns:
- This object.
-
accumulator
Sets the scope accumulator. Defaults to a freshMcpScopeAccumulator.- Parameters:
value- The accumulator. Must not benull .- Returns:
- This object.
-
reauthorizer
Sets the re-authorization callback invoked with the widened scope union. Required.- Parameters:
value- The reauthorizer. Must not benull .- Returns:
- This object.
-
maxAttempts
Sets the hard cap on re-authorization attempts per(resource, operation)before a permanent failure. Default 3.- Parameters:
value- The maximum attempts. Must be ≥ 1.- Returns:
- This object.
-
attemptStepUp
Whether to attempt step-up at all. Defaulttrue ; aclient_credentialsclient MAY setfalse to abort immediately on the first challenge.- Parameters:
value-false to abort immediately rather than attempt step-up.- Returns:
- This object.
-
previouslyRequestedScopes
Seeds the scope accumulator with the client's previously-requested scopes so the first union preserves them.- Parameters:
values- The previously-requested scopes.- Returns:
- This object.
-
build
Builds the authorizer.- Returns:
- A new
McpStepUpAuthorizer.
-