Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for jwtgo (0.23 sec)

  1. internal/jwt/parser.go

    	if err != nil {
    		return nil, &jwtgo.ValidationError{Inner: err, Errors: jwtgo.ValidationErrorMalformed}
    	}
    
    	n, err = base64DecodeBytes(token[i+1:j], buf)
    	if err != nil {
    		return nil, &jwtgo.ValidationError{Inner: err, Errors: jwtgo.ValidationErrorMalformed}
    	}
    
    	if err = claims.UnmarshalJSON(buf[:n]); err != nil {
    		return nil, &jwtgo.ValidationError{Inner: err, Errors: jwtgo.ValidationErrorMalformed}
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 09 07:53:08 GMT 2023
    - 13.9K bytes
    - Viewed (0)
  2. internal/config/identity/openid/jwt_test.go

    func TestJWTHMACType(t *testing.T) {
    	server := initJWKSServer()
    	defer server.Close()
    
    	jwt := &jwtgo.Token{
    		Method: jwtgo.SigningMethodHS256,
    		Claims: jwtgo.StandardClaims{
    			ExpiresAt: 253428928061,
    			Audience:  "76b95ae5-33ef-4283-97b7-d2a85dc2d8f4",
    		},
    		Header: map[string]interface{}{
    			"typ": "JWT",
    			"alg": jwtgo.SigningMethodHS256.Alg(),
    			"kid": "76b95ae5-33ef-4283-97b7-d2a85dc2d8f4",
    		},
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  3. cmd/jwt_test.go

    import (
    	"context"
    	"net/http"
    	"os"
    	"testing"
    
    	jwtgo "github.com/golang-jwt/jwt/v4"
    	xjwt "github.com/minio/minio/internal/jwt"
    )
    
    func getTokenString(accessKey, secretKey string) (string, error) {
    	claims := xjwt.NewMapClaims()
    	claims.SetExpiry(UTCNow().Add(defaultJWTExpiry))
    	claims.SetAccessKey(accessKey)
    	token := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, claims)
    	return token.SignedString([]byte(secretKey))
    }
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:45:14 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  4. internal/config/identity/openid/jwt.go

    	jp := new(jwtgo.Parser)
    	jp.ValidMethods = []string{
    		"RS256", "RS384", "RS512",
    		"ES256", "ES384", "ES512",
    		"HS256", "HS384", "HS512",
    		"RS3256", "RS3384", "RS3512",
    		"ES3256", "ES3384", "ES3512",
    	}
    
    	keyFuncCallback := func(jwtToken *jwtgo.Token) (interface{}, error) {
    		kid, ok := jwtToken.Header["kid"].(string)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Nov 16 04:42:31 GMT 2023
    - 8.3K bytes
    - Viewed (5)
  5. cmd/jwt.go

    	claims := xjwt.NewStandardClaims()
    	claims.SetExpiry(UTCNow().Add(defaultInterNodeJWTExpiry))
    	claims.SetAccessKey(accessKey)
    	claims.SetAudience(audience)
    
    	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.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:45:14 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  6. internal/auth/credentials.go

    }
    
    // JWTSignWithAccessKey - generates a session token.
    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
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 11.4K bytes
    - Viewed (0)
Back to top