-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdk): insecure plaintext and skip verify conn (#670)
resolves #631 _breaking change in the SDK_ ``` // WithInsecurePlaintextConn returns an Option that sets up HTTP connection sent in the clear. func WithInsecurePlaintextConn() Option { // WithInsecureSkipVerifyConn returns an Option that sets up HTTPS connection without verification. func WithInsecureSkipVerifyConn() Option { ``` - Some log statement changes
- Loading branch information
1 parent
d2fda0c
commit 5c94d02
Showing
21 changed files
with
158 additions
and
128 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
package auth | ||
|
||
import "github.com/lestrrat-go/jwx/v2/jwk" | ||
import ( | ||
"context" | ||
"net/http" | ||
|
||
"github.com/lestrrat-go/jwx/v2/jwk" | ||
) | ||
|
||
type AccessToken string | ||
|
||
type AccessTokenSource interface { | ||
AccessToken() (AccessToken, error) | ||
// probably better to use `crypto.AsymDecryption` here than roll our own since this should be | ||
AccessToken(ctx context.Context, client *http.Client) (AccessToken, error) | ||
// MakeToken probably better to use `crypto.AsymDecryption` here than roll our own since this should be | ||
// more closely linked to what happens in KAS in terms of crypto params | ||
MakeToken(func(jwk.Key) ([]byte, error)) ([]byte, error) | ||
} |
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
Oops, something went wrong.