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 Details

    • SessionMcpOauthLoginRequest

      public SessionMcpOauthLoginRequest(String serverName)
      Creates a request with its required inputs.
      Parameters:
      serverName - Name of the remote MCP server to authenticate
  • Method Details

    • getServerName

      public String getServerName()
      Returns the serverName property.
      Returns:
      Name of the remote MCP server to authenticate
    • getForceReauth

      public Boolean getForceReauth()
      Returns the forceReauth property.
      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

      public String getClientName()
      Returns the clientName property.
      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

      public String getCallbackSuccessMessage()
      Returns the callbackSuccessMessage property.
      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

      public String getClientId()
      Returns the clientId property.
      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

      public String getClientSecret()
      Returns the clientSecret property.
      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

      public Boolean getPublicClient()
      Returns the publicClient property.
      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

      public McpOauthLoginGrantType getGrantType()
      Returns the grantType property.
      Returns:
      Optional OAuth grant type override for this login. Defaults to the server configuration, or authorization_code when no grant type is specified.
    • getRedirectUri

      public String getRedirectUri()
      Returns the redirectUri property.
      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

      public String getLoginId()
      Returns the loginId property.
      Returns:
      Required for owned login. Consumes the exact prepareLogin handle once. Set forceReauth and display options during preparation, not consumption.
    • getExpectedInstallationId

      public String getExpectedInstallationId()
      Returns the expectedInstallationId property.
      Returns:
      Exact owned receipt identity. Owned login never uses an implicit helper session.
    • setForceReauth

      public SessionMcpOauthLoginRequest setForceReauth(Boolean value)
      Sets the forceReauth property.
      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

      public SessionMcpOauthLoginRequest setClientName(String value)
      Sets the clientName property.
      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

      public SessionMcpOauthLoginRequest setCallbackSuccessMessage(String value)
      Sets the callbackSuccessMessage property.
      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

      public SessionMcpOauthLoginRequest setClientId(String value)
      Sets the clientId property.
      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

      public SessionMcpOauthLoginRequest setClientSecret(String value)
      Sets the clientSecret property.
      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

      public SessionMcpOauthLoginRequest setPublicClient(Boolean value)
      Sets the publicClient property.
      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 the grantType property.
      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

      public SessionMcpOauthLoginRequest setRedirectUri(String value)
      Sets the redirectUri property.
      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

      public SessionMcpOauthLoginRequest setLoginId(String value)
      Sets the loginId property.
      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

      public SessionMcpOauthLoginRequest setExpectedInstallationId(String value)
      Sets the expectedInstallationId property.
      Parameters:
      value - Exact owned receipt identity. Owned login never uses an implicit helper session.
      Returns:
      this request