func extractIdentityID(ctx context.Context) (string, error) {
	tm := tokencontext.ReadTokenManagerFromContext(ctx)
	if tm == nil {
		return "", errors.New("Missing token manager")
	}

	token := goajwt.ContextJWT(ctx)
	if token == nil {
		return "", errors.New("Missing token")
	}
	id := token.Claims.(jwt.MapClaims)["sub"]
	if id == nil {
		return "", errors.New("Missing sub")
	}

	return id.(string), nil
}
// extractIdentityID obtains the identity ID out of the authentication context
extractIdentityID obtains the identity ID out of the authentication context
// extractIdentityID obtains the identity ID out of the authentication context
func extractIdentityID(ctx context.Context) (string, error) {
	tm := tokencontext.ReadTokenManagerFromContext(ctx)
	if tm == nil {
		return "", errors.New("Missing token manager")
	}
	token := goajwt.ContextJWT(ctx)
	if token == nil {
		return "", errors.New("Missing token")
	}
	id := token.Claims.(jwt.MapClaims)["sub"]
	if id == nil {
		return "", errors.New("Missing sub")
	}
	return id.(string), nil
}
func extractIdentityID ( ctx context . Context ) ( string , error ) { tm := tokencontext . ReadTokenManagerFromContext ( ctx ) if tm == nil { return " " , errors . New ( " " ) } token := goajwt . ContextJWT ( ctx ) if token == nil { return " " , errors . New ( " " ) } id := token . Claims . ( jwt . MapClaims ) [ " " ] if id == nil { return " " , errors . New ( " " ) } return id . ( string ) , nil }
extractIdentityID obtains the identity ID out of the authentication context
extractIdentityID obtains the identity ID out of the authentication context