This commit is contained in:
Dave Grijalva 2012-04-18 12:59:37 -07:00
parent c416da491f
commit 0008f0b730
5 changed files with 54 additions and 55 deletions

7
jwt.go
View File

@ -1,12 +1,12 @@
package jwt
import (
"strings"
"errors"
"encoding/base64"
"encoding/json"
"time"
"errors"
"net/http"
"strings"
"time"
)
// A JWT Token
@ -77,7 +77,6 @@ func Parse(tokenString string, keyFunc func(*Token)([]byte, error)) (token *Toke
return
}
func ParseFromRequest(req *http.Request, keyFunc func(*Token) ([]byte, error)) (token *Token, err error) {
// Look for an Authorization header

View File

@ -1,13 +1,13 @@
package jwt
import (
"os"
"io"
"bytes"
"testing"
"reflect"
"fmt"
"io"
"net/http"
"os"
"reflect"
"testing"
)
var jwtTestData = []struct {

View File

@ -1,12 +1,12 @@
package jwt
import (
"errors"
"encoding/pem"
"crypto"
"crypto/x509"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"encoding/pem"
"errors"
)
type SigningMethodRS256 struct{}

View File

@ -1,11 +1,11 @@
package jwt
import (
"os"
"io"
"bytes"
"testing"
"io"
"os"
"strings"
"testing"
)
var rsaTestData = []struct {

View File

@ -1,8 +1,8 @@
package jwt
import (
"fmt"
"errors"
"fmt"
)
var signingMethods = map[string]func() SigningMethod{}