update canonical import path
This commit is contained in:
parent
8f66f1d235
commit
e4ff8ac55b
2
doc.go
2
doc.go
|
@ -17,7 +17,7 @@ Convenience functions are available which will fetch keys
|
||||||
(or retrieve them from cache) via OIDC, .well-known/jwks.json, and direct urls.
|
(or retrieve them from cache) via OIDC, .well-known/jwks.json, and direct urls.
|
||||||
All keys are cached by Thumbprint, as well as kid(@issuer), if available.
|
All keys are cached by Thumbprint, as well as kid(@issuer), if available.
|
||||||
|
|
||||||
import "github.com/big-squid/go-keypairs/keyfetch"
|
import "git.rootprojects.org/root/keypairs/keyfetch"
|
||||||
|
|
||||||
pubs, err := keyfetch.OIDCJWKs("https://example.com/")
|
pubs, err := keyfetch.OIDCJWKs("https://example.com/")
|
||||||
pubs, err := keyfetch.OIDCJWK(ThumbOrKeyID, "https://example.com/")
|
pubs, err := keyfetch.OIDCJWK(ThumbOrKeyID, "https://example.com/")
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,3 +1,3 @@
|
||||||
module github.com/big-squid/go-keypairs
|
module git.rootprojects.org/root/keypairs
|
||||||
|
|
||||||
go 1.12
|
go 1.12
|
||||||
|
|
|
@ -19,8 +19,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
keypairs "github.com/big-squid/go-keypairs"
|
"git.rootprojects.org/root/keypairs"
|
||||||
"github.com/big-squid/go-keypairs/keyfetch/uncached"
|
"git.rootprojects.org/root/keypairs/keyfetch/uncached"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO should be ErrInvalidJWKURL
|
// TODO should be ErrInvalidJWKURL
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
keypairs "github.com/big-squid/go-keypairs"
|
"git.rootprojects.org/root/keypairs"
|
||||||
"github.com/big-squid/go-keypairs/keyfetch/uncached"
|
"git.rootprojects.org/root/keypairs/keyfetch/uncached"
|
||||||
)
|
)
|
||||||
|
|
||||||
var pubkey keypairs.PublicKey
|
var pubkey keypairs.PublicKey
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
keypairs "github.com/big-squid/go-keypairs"
|
"git.rootprojects.org/root/keypairs"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OIDCJWKs gets the OpenID Connect configuration from the baseURL and then calls JWKs with the specified jwks_uri
|
// OIDCJWKs gets the OpenID Connect configuration from the baseURL and then calls JWKs with the specified jwks_uri
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
keypairs "github.com/big-squid/go-keypairs"
|
"git.rootprojects.org/root/keypairs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestJWKs(t *testing.T) {
|
func TestJWKs(t *testing.T) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ Basic Usage
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/big-squid/go-keypairs/keyserve"
|
"git.rootprojects.org/root/keypairs/keyserve"
|
||||||
)
|
)
|
||||||
|
|
||||||
key, _ := ecdsa.GenerateKey(elliptic.P256, rand.Reader)
|
key, _ := ecdsa.GenerateKey(elliptic.P256, rand.Reader)
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
keypairs "github.com/big-squid/go-keypairs"
|
"git.rootprojects.org/root/keypairs"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultExpiresIn is 3 days
|
// DefaultExpiresIn is 3 days
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
keypairs "github.com/big-squid/go-keypairs"
|
"git.rootprojects.org/root/keypairs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestServeKeys(t *testing.T) {
|
func TestServeKeys(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue