@@ -102,6 +102,10 @@ func getRecipeInstanceOrThrowError() (*Recipe, error) {
102102 return nil , defaultErrors .New ("Initialisation not done. Did you forget to call the init function?" )
103103}
104104
105+ func GetRecipeInstanceOrThrowError () (* Recipe , error ) {
106+ return getRecipeInstanceOrThrowError ()
107+ }
108+
105109func recipeInit (config * sessmodels.TypeInput ) supertokens.Recipe {
106110 return func (appInfo supertokens.NormalisedAppinfo , onSuperTokensAPIError func (err error , req * http.Request , res http.ResponseWriter )) (* supertokens.RecipeModule , error ) {
107111 if singletonInstance == nil {
@@ -197,7 +201,7 @@ func (r *Recipe) handleError(err error, req *http.Request, res http.ResponseWrit
197201}
198202
199203// Claim functions
200- func (r * Recipe ) addClaimFromOtherRecipe (claim * claims.TypeSessionClaim ) error {
204+ func (r * Recipe ) AddClaimFromOtherRecipe (claim * claims.TypeSessionClaim ) error {
201205 for _ , existingClaim := range r .claimsAddedByOtherRecipes {
202206 if claim .Key == existingClaim .Key {
203207 return defaultErrors .New ("claim already added by other recipe" )
@@ -211,7 +215,7 @@ func (r *Recipe) getClaimsAddedByOtherRecipes() []*claims.TypeSessionClaim {
211215 return r .claimsAddedByOtherRecipes
212216}
213217
214- func (r * Recipe ) addClaimValidatorFromOtherRecipe (validator claims.SessionClaimValidator ) error {
218+ func (r * Recipe ) AddClaimValidatorFromOtherRecipe (validator claims.SessionClaimValidator ) error {
215219 r .claimValidatorsAddedByOtherRecipes = append (r .claimValidatorsAddedByOtherRecipes , validator )
216220 return nil
217221}
0 commit comments