-
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.
Bedre ergonomi request/klient, azure-støtte (#1180)
* Bedre ergonomi request/klient, azure-støtte * Adaptive flow as a dwim for targets accepting all tokens * Testforbedring * Reklassifiser norg * ikke eklassifiser norg
- Loading branch information
Showing
39 changed files
with
510 additions
and
504 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
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
22 changes: 22 additions & 0 deletions
22
felles/oidc/src/main/java/no/nav/vedtak/sikkerhet/oidc/token/impl/Headers.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package no.nav.vedtak.sikkerhet.oidc.token.impl; | ||
|
||
import static java.nio.charset.StandardCharsets.UTF_8; | ||
|
||
import java.util.Base64; | ||
|
||
/** | ||
* Standard header names for use in clients requesting / refreshing tokens | ||
*/ | ||
final class Headers { | ||
|
||
static final String CONTENT_TYPE = "Content-type"; | ||
static final String APPLICATION_FORM_ENCODED = "application/x-www-form-urlencoded"; | ||
|
||
static final String AUTHORIZATION = "Authorization"; | ||
static final String BASIC_AUTH_HEADER_PREFIX = "Basic "; | ||
|
||
static String basicCredentials(String username, String password) { | ||
return BASIC_AUTH_HEADER_PREFIX + Base64.getEncoder().encodeToString(String.format("%s:%s", username, password).getBytes(UTF_8)); | ||
} | ||
|
||
} |
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.