Skip to content

Commit

Permalink
use http basic auth
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Apr 25, 2024
1 parent 65fbb31 commit cf54971
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions src/providers/auth0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export class Auth0 implements OAuth2Provider {

public async validateAuthorizationCode(code: string): Promise<Auth0Tokens> {
const result = await this.client.validateAuthorizationCode<TokenResponseBody>(code, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: Auth0Tokens = {
Expand All @@ -45,7 +44,6 @@ export class Auth0 implements OAuth2Provider {

public async refreshAccessToken(refreshToken: string): Promise<Auth0Tokens> {
const result = await this.client.refreshAccessToken<TokenResponseBody>(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: Auth0Tokens = {
Expand Down
2 changes: 0 additions & 2 deletions src/providers/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export class Discord implements OAuth2Provider {

public async validateAuthorizationCode(code: string): Promise<DiscordTokens> {
const result = await this.client.validateAuthorizationCode<TokenResponseBody>(code, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: DiscordTokens = {
Expand All @@ -44,7 +43,6 @@ export class Discord implements OAuth2Provider {

public async refreshAccessToken(refreshToken: string): Promise<DiscordTokens> {
const result = await this.client.refreshAccessToken<TokenResponseBody>(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: DiscordTokens = {
Expand Down
2 changes: 0 additions & 2 deletions src/providers/dropbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export class Dropbox implements OAuth2Provider {
const result = await this.client.validateAuthorizationCode<AuthorizationCodeResponseBody>(
code,
{
authenticateWith: "request_body",
credentials: this.clientSecret
}
);
Expand All @@ -49,7 +48,6 @@ export class Dropbox implements OAuth2Provider {

public async refreshAccessToken(refreshToken: string): Promise<DropboxRefreshedTokens> {
const result = await this.client.refreshAccessToken<RefreshTokenResponseBody>(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: DropboxRefreshedTokens = {
Expand Down
2 changes: 0 additions & 2 deletions src/providers/keycloak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export class Keycloak implements OAuth2ProviderWithPKCE {
): Promise<KeycloakTokens> {
const result = await this.client.validateAuthorizationCode<TokenResponseBody>(code, {
codeVerifier,
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: KeycloakTokens = {
Expand All @@ -53,7 +52,6 @@ export class Keycloak implements OAuth2ProviderWithPKCE {

public async refreshAccessToken(refreshToken: string): Promise<KeycloakTokens> {
const result = await this.client.refreshAccessToken<TokenResponseBody>(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: KeycloakTokens = {
Expand Down
1 change: 0 additions & 1 deletion src/providers/lichess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export class Lichess implements OAuth2ProviderWithPKCE {
codeVerifier: string
): Promise<LichessTokens> {
const result = await this.client.validateAuthorizationCode(code, {
authenticateWith: "request_body",
codeVerifier
});
const tokens: LichessTokens = {
Expand Down
2 changes: 0 additions & 2 deletions src/providers/microsoft-entra-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export class MicrosoftEntraId implements OAuth2ProviderWithPKCE {
codeVerifier: string
): Promise<MicrosoftEntraIdTokens> {
const result = await this.client.validateAuthorizationCode<TokenResponseBody>(code, {
authenticateWith: "request_body",
credentials: this.clientSecret,
codeVerifier
});
Expand All @@ -53,7 +52,6 @@ export class MicrosoftEntraId implements OAuth2ProviderWithPKCE {

public async refreshAccessToken(refreshToken: string): Promise<MicrosoftEntraIdTokens> {
const result = await this.client.refreshAccessToken<TokenResponseBody>(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: MicrosoftEntraIdTokens = {
Expand Down
2 changes: 0 additions & 2 deletions src/providers/okta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export class Okta implements OAuth2ProviderWithPKCE {

public async validateAuthorizationCode(code: string, codeVerifier: string): Promise<OktaTokens> {
const result = await this.client.validateAuthorizationCode<TokenResponseBody>(code, {
authenticateWith: "request_body",
codeVerifier,
credentials: this.clientSecret
});
Expand All @@ -74,7 +73,6 @@ export class Okta implements OAuth2ProviderWithPKCE {
}
): Promise<OktaTokens> {
const result = await this.client.refreshAccessToken<TokenResponseBody>(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret,
scopes: options?.scopes ?? []
});
Expand Down
1 change: 0 additions & 1 deletion src/providers/salesforce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export class Salesforce implements OAuth2ProviderWithPKCE {

public async refreshAccessToken(refreshToken: string): Promise<SalesforceTokens> {
const result = await this.client.refreshAccessToken<TokenResponseBody>(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
return {
Expand Down
1 change: 0 additions & 1 deletion src/providers/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export class Slack implements OAuth2Provider {

public async validateAuthorizationCode(code: string): Promise<SlackTokens> {
const result = await this.client.validateAuthorizationCode<TokenResponseBody>(code, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: SlackTokens = {
Expand Down
1 change: 0 additions & 1 deletion src/providers/twitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export class Twitter implements OAuth2ProviderWithPKCE {

public async refreshAccessToken(refreshToken: string): Promise<TwitterTokens> {
const result = await this.client.refreshAccessToken<TokenResponseBody>(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: TwitterTokens = {
Expand Down
2 changes: 0 additions & 2 deletions src/providers/yahoo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export class Yahoo implements OAuth2Provider {

public async validateAuthorizationCode(code: string): Promise<YahooTokens> {
const result = await this.client.validateAuthorizationCode<TokenResponseBody>(code, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: YahooTokens = {
Expand All @@ -46,7 +45,6 @@ export class Yahoo implements OAuth2Provider {

public async refreshAccessToken(refreshToken: string): Promise<YahooTokens> {
const result = await this.client.refreshAccessToken<TokenResponseBody>(refreshToken, {
authenticateWith: "request_body",
credentials: this.clientSecret
});
const tokens: YahooTokens = {
Expand Down

0 comments on commit cf54971

Please sign in to comment.