func (m *Module) IsSCAccessToken(ctx context.Context, token string) error {
	claims, err := m.ParseToken(ctx, token)
	if err != nil {
		return err
	}
	roleValue, ok := claims["role"]
	if !ok {
		return helpers.Logger.LogError(helpers.GetRequestID(ctx), "Claim (role) not present in jwt token", nil, nil)
	}
	if roleValue != "SpaceCloud" {
		return helpers.Logger.LogError(helpers.GetRequestID(ctx), "Invalid sc access token provided, role mismatch", nil, nil)
	}
	return nil
}
IsSCAccessToken checks if its an SC access token
package auth
import (
	"context"
	"errors"
	"sync"
	"github.com/spaceuptech/helpers"
	"github.com/spaceuptech/space-cloud/gateway/config"
	"github.com/spaceuptech/space-cloud/gateway/model"
	"github.com/spaceuptech/space-cloud/gateway/utils"
	jwtUtils "github.com/spaceuptech/space-cloud/gateway/utils/jwt"
)
type Module struct {
	sync.RWMutex
	dbRules          config.DatabaseRules
	dbPrepQueryRules config.DatabasePreparedQueries
	clusterID        string
	nodeID           string
	jwt              *jwtUtils.JWT
	crud             model.CrudAuthInterface
	fileRules        []*config.FileRule
	funcRules        config.Services
	eventingRules    map[string]*config.Rule
	project          string
	fileStoreType    string
	makeHTTPRequest  utils.TypeMakeHTTPRequest
	aesKey           []byte
	adminMan       adminMan
	integrationMan integrationManagerInterface
}
func Init(clusterID, nodeID string, crud model.CrudAuthInterface, adminMan adminMan, integrationMan integrationManagerInterface) *Module {
	return &Module{clusterID: clusterID, nodeID: nodeID, dbRules: make(config.DatabaseRules), dbPrepQueryRules: make(config.DatabasePreparedQueries), crud: crud, adminMan: adminMan, jwt: jwtUtils.New(), integrationMan: integrationMan}
}
func (m *Module) GetInternalAccessToken(ctx context.Context) (string, error) {
	return m.CreateToken(ctx, map[string]interface{}{
		"id":     utils.InternalUserID,
		"nodeId": m.nodeID,
		"role":   "SpaceCloud",
	})
}
func (m *Module) GetSCAccessToken(ctx context.Context) (string, error) {
	return m.CreateToken(ctx, map[string]interface{}{
		"id":   m.nodeID,
		"role": "SpaceCloud",
	})
}