func TestNoneAlgorithm(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	assert.Logf("testing algorithm \"none\"")
	// Encode.
	claims := initClaims()
	jwtEncode, err := jwt.Encode(claims, "", jwt.NONE)
	assert.Nil(err)
	parts := strings.Split(jwtEncode.String(), ".")
	assert.Length(parts, 3)
	assert.Equal(parts[2], "")
	// Verify.
	jwtVerify, err := jwt.Verify(jwtEncode.String(), "")
	assert.Nil(err)
	assert.Equal(jwtEncode.Algorithm(), jwtVerify.Algorithm())
	assert.Equal(jwtEncode.String(), jwtVerify.String())
	testClaims(assert, jwtVerify.Claims())
}
// TestNoneAlgorithm tests the none algorithm for the
// JWT signature.
TestNoneAlgorithm tests the none algorithm for the
JWT signature.
// TestNoneAlgorithm tests the none algorithm for the // JWT signature .
func TestNoneAlgorithm(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	assert.Logf("testing algorithm \"none\"")
	claims := initClaims()
	jwtEncode, err := jwt.Encode(claims, "", jwt.NONE)
	assert.Nil(err)
	parts := strings.Split(jwtEncode.String(), ".")
	assert.Length(parts, 3)
	assert.Equal(parts[2], "")
	jwtVerify, err := jwt.Verify(jwtEncode.String(), "")
	assert.Nil(err)
	assert.Equal(jwtEncode.Algorithm(), jwtVerify.Algorithm())
	assert.Equal(jwtEncode.String(), jwtVerify.String())
	testClaims(assert, jwtVerify.Claims())
}
func TestNoneAlgorithm ( t * testing . T ) { assert := audit . NewTestingAssertion ( t , true ) assert . Logf ( " \" \" " ) claims := initClaims ( ) jwtEncode , err := jwt . Encode ( claims , " " , jwt . NONE ) assert . Nil ( err ) parts := strings . Split ( jwtEncode . String ( ) , " " ) assert . Length ( parts , 3 ) assert . Equal ( parts [ 2 ] , " " ) jwtVerify , err := jwt . Verify ( jwtEncode . String ( ) , " " ) assert . Nil ( err ) assert . Equal ( jwtEncode . Algorithm ( ) , jwtVerify . Algorithm ( ) ) assert . Equal ( jwtEncode . String ( ) , jwtVerify . String ( ) ) testClaims ( assert , jwtVerify . Claims ( ) ) }
TestNoneAlgorithm tests the none algorithm for the
JWT signature.
TestNoneAlgorithm tests the none algorithm for the JWT signature .
// Encode. // Verify.