func (ja *jwtAuthorizer) Create(network, authCode, redirectUrl string) (string, auth.Token, *auth.AuthUser, error) {
	auth, oauthtok, err := ja.auth(network, authCode, redirectUrl)
	if err != nil {
		return "", nil, nil, err
	}
	t := jwt.New(jwt.GetSigningMethod("RS256"))
	t.Claims["AccessToken"] = "orca"
	t.Claims["user"] = *auth
	t.Claims["exp"] = time.Now().Add(time.Minute * 60).Unix()
	tok, err := t.SignedString(ja.privKey)
	return tok, oauthtok, auth, err
}
Create a JWT token for the given authCode inside the given network.
There must be a registered backend for the network. This backend is used
to query the AuthUser and this user is wrapped in the JWT token.
package jwt
import (
	"crypto/rsa"
	"encoding/json"
	"fmt"
	"io"
	"regexp"
	"strconv"
	"strings"
	"time"
	"github.com/clusterit/orca/auth"
	"github.com/clusterit/orca/auth/oauth"
	"golang.org/x/oauth2"
	"github.com/dgrijalva/jwt-go"
)
var (
	backends = make(map[string]AuthBackend)
	arIndex  = regexp.MustCompile(`\[\d\]`)
)
type AuthBackend interface {
	Get(token string) (*auth.AuthUser, error)
}
type jwtAuthorizer struct {
	privKey      *rsa.PrivateKey
	authRegistry oauth.AuthRegistry
}
func RegisterBackend(name string, be AuthBackend) {
	backends[name] = be
}
func NewAuther(key *rsa.PrivateKey, registry oauth.AuthRegistry) auth.Auther {
	return &jwtAuthorizer{privKey: key, authRegistry: registry}
}
func (ja *jwtAuthorizer) parse(value string) (*jwt.Token, error) {
	return jwt.Parse(value, func(token *jwt.Token) (interface{}, error) {
		return ja.privKey.Public(), nil
	})
}