- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for SignedString (0.22 sec)
-
internal/config/identity/openid/jwt_test.go
}, Header: map[string]interface{}{ "typ": "JWT", "alg": jwtgo.SigningMethodHS256.Alg(), "kid": "76b95ae5-33ef-4283-97b7-d2a85dc2d8f4", }, } token, err := jwt.SignedString([]byte("WNGvKVyyNmXq0TraSvjaDN9CtpFgx35IXtGEffMCPR0")) if err != nil { t.Fatal(err) } fmt.Println(token) u1, err := xnet.ParseHTTPURL(server.URL) if err != nil { t.Fatal(err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 8.3K bytes - Viewed (0) -
internal/jwt/parser_test.go
claims.SetAccessKey("test") j := jwt.NewWithClaims(jwt.SigningMethodHS512, claims) tk, _ := j.SignedString([]byte("HelloSecret")) return tk } func standardClaimsToken(claims *StandardClaims) string { claims.AccessKey = "test" claims.Subject = "test" j := jwt.NewWithClaims(jwt.SigningMethodHS512, claims) tk, _ := j.SignedString([]byte("HelloSecret")) return tk } func TestParserParse(t *testing.T) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Nov 05 19:20:08 UTC 2021 - 6K bytes - Viewed (0) -
cmd/jwt.go
claims := xjwt.NewStandardClaims() claims.SetExpiry(UTCNow().Add(defaultInterNodeJWTExpiry)) claims.SetAccessKey(accessKey) jwt := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, claims) return jwt.SignedString([]byte(secretKey)) } // Check if the request is authenticated. // Returns nil if the request is authenticated. errNoAuthToken if token missing. // Returns errAuthentication for all other errors.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 4.5K bytes - Viewed (0) -
cmd/jwt_test.go
claims := xjwt.NewMapClaims() claims.SetExpiry(UTCNow().Add(defaultJWTExpiry)) claims.SetAccessKey(accessKey) token := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, claims) return token.SignedString([]byte(secretKey)) } // Tests web request authenticator. func TestWebRequestAuthenticate(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 4.4K bytes - Viewed (0) -
internal/config/dns/operator_dns.go
claims := &jwt.StandardClaims{ ExpiresAt: int64(15 * time.Minute), Issuer: c.username, Subject: config.EnvDNSWebhook, } token := jwt.NewWithClaims(jwt.SigningMethodHS512, claims) ss, err := token.SignedString([]byte(c.password)) if err != nil { return err } r.Header.Set("Authorization", "Bearer "+ss) return nil } func (c *OperatorDNS) endpoint(bucket string, delete bool) (string, error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Mar 06 16:56:10 UTC 2023 - 6.6K bytes - Viewed (0) -
internal/auth/credentials.go
func JWTSignWithAccessKey(accessKey string, m map[string]interface{}, tokenSecret string) (string, error) { m["accessKey"] = accessKey jwt := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, jwtgo.MapClaims(m)) return jwt.SignedString([]byte(tokenSecret)) } // ExtractClaims extracts JWT claims from a security token using a secret key func ExtractClaims(token, secretKey string) (*jwt.MapClaims, error) { if token == "" || secretKey == "" {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 28 17:14:16 UTC 2024 - 12K bytes - Viewed (0) -
cmd/server_test.go
ExpiresAt: time.Now().UTC().Add(defaultPrometheusJWTExpiry).Unix(), Subject: s.accessKey, Issuer: "prometheus", }) token, err := jwt.SignedString([]byte(s.secretKey)) c.Assert(err, nil) for _, cpath := range globalMetricsV3CollectorPaths { request, err := newTestSignedRequest(http.MethodGet, s.endPoint+minioReservedBucketPath+metricsV3Path+string(cpath),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 15 16:28:02 UTC 2024 - 116.3K bytes - Viewed (0)