Class SessionMcpOauthLoginRequest
java.lang.Object
com.github.copilot.generated.rpc.SessionMcpOauthLoginRequest
@CopilotExperimental
@Generated("copilot-sdk-codegen")
public final class SessionMcpOauthLoginRequest
extends Object
Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, callback handling, and static OAuth client selection.
Required inputs are constructor arguments. Optional inputs have fluent setters.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionSessionMcpOauthLoginRequest(String serverName) Creates a request with its required inputs. -
Method Summary
Modifier and TypeMethodDescriptionReturns thecallbackSuccessMessageproperty.Returns theclientIdproperty.Returns theclientNameproperty.Returns theclientSecretproperty.Returns theexpectedInstallationIdproperty.Returns theforceReauthproperty.Returns thegrantTypeproperty.Returns theloginIdproperty.Returns thepublicClientproperty.Returns theredirectUriproperty.Returns theserverNameproperty.setCallbackSuccessMessage(String value) Sets thecallbackSuccessMessageproperty.setClientId(String value) Sets theclientIdproperty.setClientName(String value) Sets theclientNameproperty.setClientSecret(String value) Sets theclientSecretproperty.setExpectedInstallationId(String value) Sets theexpectedInstallationIdproperty.setForceReauth(Boolean value) Sets theforceReauthproperty.Sets thegrantTypeproperty.setLoginId(String value) Sets theloginIdproperty.setPublicClient(Boolean value) Sets thepublicClientproperty.setRedirectUri(String value) Sets theredirectUriproperty.
-
Constructor Details
-
SessionMcpOauthLoginRequest
Creates a request with its required inputs.- Parameters:
serverName- Name of the remote MCP server to authenticate
-
-
Method Details
-
getServerName
Returns theserverNameproperty.- Returns:
- Name of the remote MCP server to authenticate
-
getForceReauth
Returns theforceReauthproperty.- Returns:
- When true, clears any cached OAuth token for the server and runs a full new authorization. Use when the user explicitly wants to switch accounts or believes their session is stuck.
-
getClientName
Returns theclientNameproperty.- Returns:
- Optional override for the OAuth client display name shown on the consent screen. Applies to newly registered dynamic clients only — existing registrations keep the name they were created with. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass their own surface-specific label so the consent screen matches the product the user sees.
-
getCallbackSuccessMessage
Returns thecallbackSuccessMessageproperty.- Returns:
- Optional override for the body text shown on the OAuth loopback callback success page. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass surface-specific copy telling the user where to return.
-
getClientId
Returns theclientIdproperty.- Returns:
- Optional OAuth client ID override for this login. When set, the runtime uses this pre-registered static client instead of dynamic client registration.
-
getClientSecret
Returns theclientSecretproperty.- Returns:
- Optional OAuth client secret override for this login. The runtime treats this as an ephemeral host-owned secret, uses it for this authentication attempt and does not persist it.
-
getPublicClient
Returns thepublicClientproperty.- Returns:
- Optional override indicating whether the static OAuth client is public. When false, the runtime treats it as confidential and uses the per-login clientSecret if provided, otherwise retrieving the client secret from the MCP OAuth secret store.
-
getGrantType
Returns thegrantTypeproperty.- Returns:
- Optional OAuth grant type override for this login. Defaults to the server configuration, or authorization_code when no grant type is specified.
-
getRedirectUri
Returns theredirectUriproperty.- Returns:
- Optional externally visible HTTPS redirect URI for a host-managed callback endpoint. When supplied, the runtime still owns discovery, PKCE, token exchange, persistence, and reconnect, but does not bind a loopback listener or terminate HTTPS. The URI must not contain query parameters or a fragment and must be registered for the selected CIMD, DCR, or static OAuth client.
-
getLoginId
Returns theloginIdproperty.- Returns:
- Required for owned login. Consumes the exact prepareLogin handle once. Set forceReauth and display options during preparation, not consumption.
-
getExpectedInstallationId
Returns theexpectedInstallationIdproperty.- Returns:
- Exact owned receipt identity. Owned login never uses an implicit helper session.
-
setForceReauth
Sets theforceReauthproperty.- Parameters:
value- When true, clears any cached OAuth token for the server and runs a full new authorization. Use when the user explicitly wants to switch accounts or believes their session is stuck.- Returns:
- this request
-
setClientName
Sets theclientNameproperty.- Parameters:
value- Optional override for the OAuth client display name shown on the consent screen. Applies to newly registered dynamic clients only — existing registrations keep the name they were created with. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass their own surface-specific label so the consent screen matches the product the user sees.- Returns:
- this request
-
setCallbackSuccessMessage
Sets thecallbackSuccessMessageproperty.- Parameters:
value- Optional override for the body text shown on the OAuth loopback callback success page. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass surface-specific copy telling the user where to return.- Returns:
- this request
-
setClientId
Sets theclientIdproperty.- Parameters:
value- Optional OAuth client ID override for this login. When set, the runtime uses this pre-registered static client instead of dynamic client registration.- Returns:
- this request
-
setClientSecret
Sets theclientSecretproperty.- Parameters:
value- Optional OAuth client secret override for this login. The runtime treats this as an ephemeral host-owned secret, uses it for this authentication attempt and does not persist it.- Returns:
- this request
-
setPublicClient
Sets thepublicClientproperty.- Parameters:
value- Optional override indicating whether the static OAuth client is public. When false, the runtime treats it as confidential and uses the per-login clientSecret if provided, otherwise retrieving the client secret from the MCP OAuth secret store.- Returns:
- this request
-
setGrantType
Sets thegrantTypeproperty.- Parameters:
value- Optional OAuth grant type override for this login. Defaults to the server configuration, or authorization_code when no grant type is specified.- Returns:
- this request
-
setRedirectUri
Sets theredirectUriproperty.- Parameters:
value- Optional externally visible HTTPS redirect URI for a host-managed callback endpoint. When supplied, the runtime still owns discovery, PKCE, token exchange, persistence, and reconnect, but does not bind a loopback listener or terminate HTTPS. The URI must not contain query parameters or a fragment and must be registered for the selected CIMD, DCR, or static OAuth client.- Returns:
- this request
-
setLoginId
Sets theloginIdproperty.- Parameters:
value- Required for owned login. Consumes the exact prepareLogin handle once. Set forceReauth and display options during preparation, not consumption.- Returns:
- this request
-
setExpectedInstallationId
Sets theexpectedInstallationIdproperty.- Parameters:
value- Exact owned receipt identity. Owned login never uses an implicit helper session.- Returns:
- this request
-