diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index cdf24ee0..0e3c4f7f 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,13 +1,13 @@ [package] org = "ballerina" name = "oauth2" -version = "2.12.1" +version = "2.13.0" authors = ["Ballerina"] keywords = ["security", "authorization", "introspection"] repository = "https://github.com/ballerina-platform/module-ballerina-oauth2" icon = "icon.png" license = ["Apache-2.0"] -distribution = "2201.10.0-20241007-143200-6b69ca80" +distribution = "2201.11.0" [platform.java21] graalvmCompatible = true @@ -15,5 +15,5 @@ graalvmCompatible = true [[platform.java21.dependency]] groupId = "io.ballerina.stdlib" artifactId = "oauth2-native" -version = "2.12.1" -path = "../native/build/libs/oauth2-native-2.12.1-SNAPSHOT.jar" +version = "2.13.0" +path = "../native/build/libs/oauth2-native-2.13.0-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index d8d46a00..487ce044 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,12 +5,12 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20241112-214900-6b80ab87" +distribution-version = "2201.11.0-20241121-075100-c4c87cbc" [[package]] org = "ballerina" name = "cache" -version = "3.8.1" +version = "3.9.0" dependencies = [ {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "jballerina.java"}, @@ -32,7 +32,7 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.3" +version = "2.8.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} @@ -44,7 +44,7 @@ modules = [ [[package]] org = "ballerina" name = "io" -version = "1.6.2" +version = "1.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.value"} @@ -116,7 +116,7 @@ dependencies = [ [[package]] org = "ballerina" name = "log" -version = "2.10.1" +version = "2.11.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -130,7 +130,7 @@ modules = [ [[package]] org = "ballerina" name = "oauth2" -version = "2.12.1" +version = "2.13.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -156,7 +156,7 @@ dependencies = [ [[package]] org = "ballerina" name = "task" -version = "2.5.1" +version = "2.6.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} @@ -190,7 +190,7 @@ modules = [ [[package]] org = "ballerina" name = "url" -version = "2.4.1" +version = "2.5.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] diff --git a/ballerina/build.gradle b/ballerina/build.gradle index 3ae68dd5..c583a5d1 100644 --- a/ballerina/build.gradle +++ b/ballerina/build.gradle @@ -17,19 +17,8 @@ import org.apache.tools.ant.taskdefs.condition.Os -buildscript { - repositories { - maven { - url = 'https://maven.pkg.github.com/ballerina-platform/plugin-gradle' - credentials { - username System.getenv("packageUser") - password System.getenv("packagePAT") - } - } - } - dependencies { - classpath "io.ballerina:plugin-gradle:${project.ballerinaGradlePluginVersion}" - } +plugins { + id 'io.ballerina.plugin' } description = 'Ballerina - OAuth2 Ballerina' @@ -54,8 +43,6 @@ def stripBallerinaExtensionVersion(String extVersion) { } } -apply plugin: 'io.ballerina.plugin' - ballerina { packageOrganization = packageOrg module = packageName diff --git a/ballerina/tests/client_oauth2_provider_test.bal b/ballerina/tests/client_oauth2_provider_test.bal index 98705dd5..0aa7e14e 100644 --- a/ballerina/tests/client_oauth2_provider_test.bal +++ b/ballerina/tests/client_oauth2_provider_test.bal @@ -23,7 +23,8 @@ import ballerina/lang.runtime as runtime; // Test the client credentials grant type with valid credentials @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testClientCredentialsGrantType1() returns Error? { ClientCredentialsGrantConfig config = { @@ -53,7 +54,8 @@ isolated function testClientCredentialsGrantType1() returns Error? { // Test the client credentials grant type with invalid client credentials @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testClientCredentialsGrantType2() { ClientCredentialsGrantConfig config = { @@ -89,7 +91,8 @@ isolated function testClientCredentialsGrantType2() { // Test the client credentials grant type with valid client-id and invalid client-secret @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testClientCredentialsGrantType3() { ClientCredentialsGrantConfig config = { @@ -201,7 +204,8 @@ isolated function testClientCredentialsGrantType5() returns Error? { // Test the password grant type with valid credentials @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testPasswordGrantType1() returns Error? { PasswordGrantConfig config = { @@ -290,7 +294,8 @@ isolated function testPasswordGrantType2() returns Error? { // Test the password grant type with an invalid username, password, and a valid refresh config @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testPasswordGrantType3() { PasswordGrantConfig config = { @@ -376,7 +381,8 @@ isolated function testPasswordGrantType4() { // Test the password grant type with an valid username, password, and without client-id and client-secret @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testPasswordGrantType5() { PasswordGrantConfig config = { @@ -555,7 +561,8 @@ isolated function testPasswordGrantType9() returns Error? { // Test the refresh token grant type with an invalid refresh token @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testRefreshTokenGrantType1() { RefreshTokenGrantConfig config = { @@ -650,7 +657,8 @@ isolated function testRefreshTokenGrantType3() { // Test the refresh token grant type with invalid client-id and client-secret @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testRefreshTokenGrantType4() { RefreshTokenGrantConfig config = { @@ -726,7 +734,8 @@ isolated function testJwtBearerGrantType1() returns Error? { // Test the JWT bearer grant type with an valid JWT (different issuer) @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testJwtBearerGrantType2() { string jwt = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxN" + @@ -756,7 +765,8 @@ isolated function testJwtBearerGrantType2() { // Test the JWT bearer grant type with an invalid assertion @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testJwtBearerGrantType3() { JwtBearerGrantConfig config = { @@ -826,7 +836,8 @@ isolated function testJwtBearerGrantType4() { // Test the JWT bearer grant type with an valid JWT, and without client-id and client-secret @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testJwtBearerGrantType5() { string jwt = "eyJhbGciOiJSUzI1NiIsICJ0eXAiOiJKV1QiLCAia2lkIjoiTXpZeE1tRmtPR1l3TVdJMFpXTm1ORGN4TkdZd1ltTTRaVEEzTV" + @@ -859,7 +870,8 @@ isolated function testJwtBearerGrantType5() { // Test the JWT bearer grant type with invalid client-id and client-secret @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testJwtBearerGrantType6() { string jwt = "eyJhbGciOiJSUzI1NiIsICJ0eXAiOiJKV1QiLCAia2lkIjoiTXpZeE1tRmtPR1l3TVdJMFpXTm1ORGN4TkdZd1ltTTRaVEEzTV" + diff --git a/ballerina/tests/listener_oauth2_provider_test.bal b/ballerina/tests/listener_oauth2_provider_test.bal index 9d56093f..12d19c68 100644 --- a/ballerina/tests/listener_oauth2_provider_test.bal +++ b/ballerina/tests/listener_oauth2_provider_test.bal @@ -37,7 +37,8 @@ isolated function getAccessToken() returns string|Error { // Test the introspection request with successful token @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testTokenIntrospection1() returns Error? { string accessToken = check getAccessToken(); @@ -64,7 +65,8 @@ isolated function testTokenIntrospection1() returns Error? { // Test the introspection request with successful token with cache configurations @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testTokenIntrospection2() returns Error? { string accessToken = check getAccessToken(); @@ -109,7 +111,8 @@ isolated function testTokenIntrospection2() returns Error? { // Test the introspection request with invalid token @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testTokenIntrospection3() returns Error? { string accessToken = "invalid_token"; @@ -151,7 +154,8 @@ isolated function testTokenIntrospection4() { // Test the introspection request with successful token without authenticating the client @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testTokenIntrospection5() returns Error? { string accessToken = check getAccessToken(); @@ -174,7 +178,8 @@ isolated function testTokenIntrospection5() returns Error? { // Test the introspection request with successful token with invalid OAuth2 client credentials grant type @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testTokenIntrospection6() { IntrospectionConfig config = { @@ -205,7 +210,8 @@ isolated function testTokenIntrospection6() { // Test the introspection request with successful token with invalid OAuth2 password grant type @test:Config { - groups: ["skipOnWindows"] + groups: ["skipOnWindows"], + enable: false } isolated function testTokenIntrospection7() { IntrospectionConfig config = { diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index 7adfd6e7..c3abb2a2 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -7,7 +7,7 @@ keywords = ["security", "authorization", "introspection"] repository = "https://github.com/ballerina-platform/module-ballerina-oauth2" icon = "icon.png" license = ["Apache-2.0"] -distribution = "2201.10.0-20241007-143200-6b69ca80" +distribution = "2201.11.0" [platform.java21] graalvmCompatible = true diff --git a/build.gradle b/build.gradle index d56285aa..2a390d2a 100644 --- a/build.gradle +++ b/build.gradle @@ -17,10 +17,10 @@ */ plugins { - id "com.github.spotbugs" version "${githubSpotbugsVersion}" - id "com.github.johnrengelman.shadow" version "${githubJohnrengelmanShadowVersion}" - id "de.undercouch.download" version "${underCouchDownloadVersion}" - id "net.researchgate.release" version "${researchgateReleaseVersion}" + id "com.github.spotbugs-base" + id "com.github.johnrengelman.shadow" + id "de.undercouch.download" + id "net.researchgate.release" } allprojects { diff --git a/gradle.properties b/gradle.properties index 0c91d069..0217fa39 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,24 +1,30 @@ org.gradle.caching=true group=io.ballerina.stdlib -version=2.12.1-SNAPSHOT -puppycrawlCheckstyleVersion=10.12.0 +version=2.13.0-SNAPSHOT +ballerinaLangVersion=2201.11.0-20241121-075100-c4c87cbc + +checkstylePluginVersion=10.12.0 +spotbugsPluginVersion=6.0.18 +shadowJarPluginVersion=8.1.1 +downloadPluginVersion=5.4.0 +releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.0.1 -ballerinaLangVersion=2201.11.0-20241112-214900-6b80ab87 -githubJohnrengelmanShadowVersion=8.1.1 -underCouchDownloadVersion=5.4.0 -researchgateReleaseVersion=2.8.0 -githubSpotbugsVersion=6.0.18 # Dependencies -stdlibCacheVersion=3.8.1-20241113-125700-b75a1bf -stdlibCryptoVersion=2.7.3-20241113-081400-d015a39 -stdlibLogVersion=2.10.1-20241113-120000-4577868 -stdlibTimeVersion=2.6.0-20241113-073800-201b904 -stdlibUrlVersion=2.4.1-20241113-073900-335ff51 +# Level 01 +stdlibIoVersion=1.7.0-20241121-173300-0fbd5d4 +stdlibTimeVersion=2.6.0-20241122-120400-97742a7 +stdlibUrlVersion=2.5.0-20241122-120400-67af694 + +# Level 02 +stdlibConstraintVersion=1.6.0-20241122-133100-98689e2 +stdlibCryptoVersion=2.8.0-20241122-130800-24f1267 +stdlibLogVersion=2.11.0-20241122-150100-2e1a3ca +stdlibTaskVersion=2.6.0-20241122-124800-cb84357 + +# Level 03 +stdlibCacheVersion=3.9.0-20241122-182900-c956a97 -# Transitive dependencies -stdlibTaskVersion=2.5.1-20241113-123500-f905281 -stdlibConstraintVersion=1.6.0-20241113-090900-d276ad5 -stdlibIoVersion=1.6.2-20241112-233100-995cf5f -observeVersion=1.4.0-20241113-092000-b83ae74 -observeInternalVersion=1.3.1-20241113-101700-265054d +# Ballerina Observe +observeVersion=1.4.0-20241122-184200-c596093 +observeInternalVersion=1.4.0-20241122-185200-9e5b1bb diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9f4197d5..e2847c82 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/native/build.gradle b/native/build.gradle index 49b4e078..da0ef845 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -25,7 +25,7 @@ description = 'Ballerina - OAuth2 Java Utils' dependencies { checkstyle project(':checkstyle') - checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstylePluginVersion}" implementation group: 'org.ballerinalang', name: 'ballerina-runtime', version: "${ballerinaLangVersion}" implementation group: 'io.ballerina.stdlib', name: 'crypto-native', version: "${stdlibCryptoVersion}" diff --git a/settings.gradle b/settings.gradle index 57f5dac2..12577a18 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,6 +7,27 @@ * in the user manual at https://docs.gradle.org/6.3/userguide/multi_project_builds.html */ +pluginManagement { + plugins { + id "com.github.spotbugs-base" version "${spotbugsPluginVersion}" + id "com.github.johnrengelman.shadow" version "${shadowJarPluginVersion}" + id "de.undercouch.download" version "${downloadPluginVersion}" + id "net.researchgate.release" version "${releasePluginVersion}" + id "io.ballerina.plugin" version "${ballerinaGradlePluginVersion}" + } + + repositories { + gradlePluginPortal() + maven { + url = 'https://maven.pkg.github.com/ballerina-platform/*' + credentials { + username System.getenv("packageUser") + password System.getenv("packagePAT") + } + } + } +} + plugins { id "com.gradle.enterprise" version "3.13.2" }