forked from mirror/jwt
use cleaner version of prefix checking (thanks shurcooL)
This commit is contained in:
parent
dd0ede9741
commit
d9df83c827
|
@ -14,6 +14,7 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
)
|
)
|
||||||
|
@ -205,8 +206,5 @@ func signToken() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEs() bool {
|
func isEs() bool {
|
||||||
if alg := *flagAlg; len(alg) >= 2 && alg[0:2] == "ES" {
|
return strings.HasPrefix(*flagAlg, "ES")
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue