-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #478 from navikt/modernize
Kotlinize
- Loading branch information
Showing
175 changed files
with
3,004 additions
and
3,010 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,10 @@ jobs: | |
- name: Checkout latest code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 11 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
java-version: 17 | ||
|
||
- name: Setup build cache | ||
uses: actions/cache@v1 | ||
|
@@ -53,4 +53,4 @@ jobs: | |
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Actions release" | ||
mvn --settings .github/settings.xml -Pgithub --batch-mode -Dmaven.main.skip=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true deploy | ||
mvn --settings .github/settings.xml -Pgithub --batch-mode -Dmaven.main.skip=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
11 | ||
17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 2 additions & 26 deletions
28
...-client-core/src/main/java/no/nav/security/token/support/client/core/OAuth2GrantType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,14 @@ | ||
package no.nav.security.token.support.client.core; | ||
|
||
import java.util.Objects; | ||
import java.util.Optional; | ||
|
||
public class OAuth2GrantType { | ||
public record OAuth2GrantType(String value) { | ||
public static final OAuth2GrantType JWT_BEARER = new OAuth2GrantType("urn:ietf:params:oauth:grant-type:jwt-bearer"); | ||
public static final OAuth2GrantType CLIENT_CREDENTIALS = new OAuth2GrantType("client_credentials"); | ||
public static final OAuth2GrantType TOKEN_EXCHANGE = new OAuth2GrantType("urn:ietf:params:oauth:grant-type:token-exchange"); | ||
private final String value; | ||
|
||
public OAuth2GrantType(String value) { | ||
this.value = Optional.ofNullable(value) | ||
.orElseThrow(() -> new OAuth2ClientException("value for OAuth2GrantType cannot be null")); | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
OAuth2GrantType that = (OAuth2GrantType) o; | ||
return value.equals(that.value); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(value); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return value; | ||
.orElseThrow(() -> new OAuth2ClientException("value for OAuth2GrantType cannot be null")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.