// NewToken creates a new Token
NewToken creates a new Token
// NewToken creates a new Token
func NewToken(version string, domain string) (*GrantToken, error) {
	var t *GrantToken
	switch version {
	case "v1":
		secret := uniuri.NewLen(uniuri.UUIDLen)
		t = &GrantToken{
			Version: version,
			Domain:  domain,
			secret:  secret,
		}
	default:
		return nil, echo.NewHTTPError(http.StatusBadRequest, "invalid version in the grant token")
	}
	return t, nil
}
func NewToken ( version string , domain string ) ( * GrantToken , error ) { var t * GrantToken switch version { case " " : secret := uniuri . NewLen ( uniuri . UUIDLen ) t = & GrantToken { Version : version , Domain : domain , secret : secret , } default : return nil , echo . NewHTTPError ( http . StatusBadRequest , " " ) } return t , nil }
NewToken creates a new Token
NewToken creates a new Token