Skip to content

fix(client): Authentication v2: auth/login + auth/logout - #126

Merged
Rizzen merged 2 commits into
masterfrom
mark/IJAI-781-v2-auth-contract
Sep 11, 2026
Merged

fix(client): Authentication v2: auth/login + auth/logout#126
Rizzen merged 2 commits into
masterfrom
mark/IJAI-781-v2-auth-contract

Conversation

@Rizzen

@Rizzen Rizzen commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@Rizzen
Rizzen requested a review from EugeneTheDev September 9, 2026 10:40
* authentication, and the call fails locally without sending a request.
*
* The caller must select an advertised method that supports protocol-driven login. The SDK checks
* that authentication is advertised but does not validate [methodId] against the advertised list.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we validate method ids against a list of methods? Should be a simple contains check, right?

return AcpMethod.AgentMethods.V2.AuthLogout(protocol, LogoutAuthRequest(_meta))
}

private suspend fun requireAuthenticationSupport(method: String) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: to avoid hardcoding auth/login and auth/logout strings, wdyt about replacing method: String with method: AcpMethod and then using AgentMethods.AuthLogin/AuthLogout?

@Rizzen
Rizzen merged commit d6507cf into master Sep 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants