Skip to content
Snippets Groups Projects
utils.go 399 B
Newer Older
Gabriel Zachmann's avatar
Gabriel Zachmann committed
	"github.com/oidc-mytoken/server/internal/utils/hashutils"
	"github.com/oidc-mytoken/server/shared/utils/issuerutils"
)

// CreateMytokenSubject creates the subject of a Mytoken from the oidc subject and oidc issuer
func CreateMytokenSubject(oidcSub, oidcIss string) string {
Gabriel Zachmann's avatar
Gabriel Zachmann committed
	comb := issuerutils.CombineSubIss(oidcSub, oidcIss)
	return hashutils.SHA3_256Str([]byte(comb))