-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Changed Azure credentials check to have condition on AAD_ISSUER_URI…
… (which is actually used), not AZURE_OPENID_CONFIG_TOKEN_ENDPOINT (which should be used). - All subclasses of ClientCredential now takes tokenEndpoint. AzureClientCredential just doesn't use it (yet). Simpler code. - Cleaned up for readability in ClientCredentialConfig.
- Loading branch information
Showing
5 changed files
with
36 additions
and
73 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
10 changes: 1 addition & 9 deletions
10
...c/main/java/no/nav/testnav/libs/securitycore/domain/azuread/AzureNavClientCredential.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,17 +1,9 @@ | ||
package no.nav.testnav.libs.securitycore.domain.azuread; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@EqualsAndHashCode(callSuper = false) | ||
public class AzureNavClientCredential extends ClientCredential { | ||
|
||
private final String tokenEndpoint; | ||
|
||
AzureNavClientCredential(String tokenEndpoint, String clientId, String clientSecret) { | ||
super(clientId, clientSecret); | ||
this.tokenEndpoint = tokenEndpoint; | ||
super(tokenEndpoint, clientId, clientSecret); | ||
} | ||
|
||
} |
29 changes: 1 addition & 28 deletions
29
...va/no/nav/testnav/libs/securitycore/domain/azuread/AzureTrygdeetatenClientCredential.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,36 +1,9 @@ | ||
package no.nav.testnav.libs.securitycore.domain.azuread; | ||
|
||
import lombok.Getter; | ||
|
||
import java.util.Objects; | ||
|
||
@Getter | ||
public class AzureTrygdeetatenClientCredential extends ClientCredential { | ||
|
||
private final String tokenEndpoint; | ||
|
||
AzureTrygdeetatenClientCredential(String tokenEndpoint, String clientId, String clientSecret) { | ||
super(clientId, clientSecret); | ||
this.tokenEndpoint = tokenEndpoint; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
if (!super.equals(o)) { | ||
return false; | ||
} | ||
return Objects.equals(tokenEndpoint, ((AzureTrygdeetatenClientCredential) o).getTokenEndpoint()); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(super.hashCode(), tokenEndpoint); | ||
super(tokenEndpoint, clientId, clientSecret); | ||
} | ||
|
||
} |
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