Skip to content

Fix #108: Implement client_credentials auth - #109

Merged
Crim merged 2 commits into
Crim:masterfrom
FlipWarthog:108
Sep 22, 2026
Merged

Crim merged 2 commits into
Crim:masterfrom
FlipWarthog:108

Conversation

@FlipWarthog

@FlipWarthog FlipWarthog commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fix #108: Implement cient_credentials auth

@Crim Here's the minimal approach since there is a lot in common between grant_type=password and grant_type=client_credentials. Let me know if it's valid or you'd like it more separated from the existing logic.

@Crim

Crim commented Sep 19, 2026

Copy link
Copy Markdown
Owner

I think what you have works fine, although my personal opinion would be to have an explicit/new SessionRefreshHandler implementation for this as well as a new XyzLoginCredentials class with only the required properties.

My thought process being, if any changes in the future need to happen to either login type, its easier/clearer to make and scoped to that login type specifically without any possibility of affecting the others.

If you're interested/have the time I'd prefer that approach, but if you're busy and don't have the time I understand and I can tinker with it.

Definitely appreciate the contribution either way!

@FlipWarthog

Copy link
Copy Markdown
Contributor Author

Makes perfect sense and I can get those changes together.

@FlipWarthog

Copy link
Copy Markdown
Contributor Author

Pushed those changes. Let me know if that's what you were looking for.

On Monday, when I'm back on my client laptop, I can smoke test this against their sandbox Pardot environment.

@FlipWarthog

Copy link
Copy Markdown
Contributor Author

On Monday, when I'm back on my client laptop, I can smoke test this against their sandbox Pardot environment.

Confirmed working:

Executing request POST https://[client].sandbox.my.salesforce.com/services/oauth2/token HTTP/1.1 with [grant_type=client_credentials, client_id=[our client ID], client_secret=XXXXXXX]

Successfully gets an auth token.

@Crim

Crim commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Awesome thanks! I'll work on getting this merged in shortly! Appreciate the contribution!

@Crim Crim changed the title Fix #108: Implement cient_credentials auth Fix #108: Implement client_credentials auth Sep 22, 2026
@Crim
Crim merged commit 4b586ae into Crim:master Sep 22, 2026
1 of 2 checks 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.

Salesforce SSO: Add support for Client Credentials Flow

3 participants