Skip to content

Commit

Permalink
Add auth support for JwtIssuerConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuvindu committed Nov 27, 2024
1 parent 7b48e8b commit 9d35d4b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions ballerina/client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ public isolated client class Client {
# + config - The configurations to be used when initializing the `connector`
# + serviceUrl - URL of the target service
# + return - An error if connector initialization failed
public isolated function init(oas:ConnectionConfig config, string serviceUrl = "https://www.googleapis.com/calendar/v3") returns error? {
oas:Client genClient = check new oas:Client(config, serviceUrl);
public isolated function init(ConnectionConfig config, string serviceUrl = "https://www.googleapis.com/calendar/v3") returns error? {
oas:ConnectionConfig connectionConfig = check config.ensureType();
oas:Client genClient = check new oas:Client(connectionConfig, serviceUrl);
self.genClient = genClient;
return;
}
Expand Down
2 changes: 1 addition & 1 deletion ballerina/modules/oas/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public type CalendarEventsImportQueries record {
@display {label: "Connection Config"}
public type ConnectionConfig record {|
# Configurations related to client authentication
http:BearerTokenConfig|OAuth2RefreshTokenGrantConfig auth;
http:BearerTokenConfig|OAuth2RefreshTokenGrantConfig|http:JwtIssuerConfig auth;
# The HTTP version understood by the client
http:HttpVersion httpVersion = http:HTTP_2_0;
# Configurations related to HTTP/1.x protocol
Expand Down
2 changes: 1 addition & 1 deletion ballerina/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ public type CalendarEventsImportQueries record {
@display {label: "Connection Config"}
public type ConnectionConfig record {|
# Configurations related to client authentication
http:BearerTokenConfig|OAuth2RefreshTokenGrantConfig auth;
http:BearerTokenConfig|OAuth2RefreshTokenGrantConfig|http:JwtIssuerConfig auth;
# The HTTP version understood by the client
http:HttpVersion httpVersion = http:HTTP_2_0;
# Configurations related to HTTP/1.x protocol
Expand Down

0 comments on commit 9d35d4b

Please sign in to comment.