{
  "factory": {
    "id": "abstract-jaas-login-module",
    "type": "entaxy.security.jaas.loginmodule",
    "description": "Abstract JAAS login module",
    "isAbstract": true,
    "parent": "abstract-jaas-component",
    "label": "security,jaas,loginmodule",
    "category": ""
  },
  "entaxy.security.jaas.loginmodule": {
    "moduleClassName": "to.be.Replaced"
  },
  "fields": {
  	"__objectId": {
	  "type": "String",
	  "required": true,
	  "isHidden": true,
	  "defaultValue": {
	    "@CALCULATED": {
	      "expression": "${properties.realm}.${factoryId}.${properties.classifier}",
	      "targetPath": "$.objectId",
	      "removeResolved": true,
	      "lazy": false
	    }
	  }
	},
	"displayName": {
	  "required": true,
	  "defaultValue": {
	    "@CALCULATED": {
		  "expression": "${properties.classifier}",
		  "lazy": false
	    }
	  }
	},
//	"__entaxyContainerId": {
//	  "type": "String",
//	  "isHidden": true,
//	  "required": true,
//	  "defaultValue": {
//		"@CALCULATED": {
//		  "expression": "${#OWNER#.objectId}",
//		  "lazy": false
//		}
//	  }
//	},
	"realm": {
	  "type": "String",
	  "required": true,
	  "isHidden": true,
	  "defaultValue": {
	    "@CALCULATED": {
	      "expression": "${#OWNER#.objectId}",
	      "lazy": false
	    }
	  }
	},
	"classifier": {
	  "displayName": "Classifier",
      "description": "Unique identifier",
      "type": "String",
	  "required": true,
	  "immutable": true,
	  "defaultValue": "main",
	  "@UNIQUE": {
	    "filterByParentFieldValues": true
	  }
	},
    "className": {
      "type": "String",
      "group": "general",
      "required": true,
      "isHidden": true,
      "defaultValue": {
        "@CALCULATED": {
          "lazy": true,
          "expression": "${#FACTORY#.#TYPEINFO#.moduleClassName}"
        }
      }
    },
    "flags": {
    	"displayName": "Options",
		"description": "Flags for Defining a JAAS Module. <br/> required - Authentication of this login module must succeed. Always proceed to the next login module in this entry, irrespective of success or failure. <br/> requisite - Authentication of this login module must succeed. If success, proceed to the next login module; if failure, return immediately without processing the remaining login modules. <br/> sufficient - Authentication of this login module is not required to succeed. If success, return immediately without processing the remaining login modules; if failure, proceed to the next login module. <br/> optional - Authentication of this login module is not required to succeed. Always proceed to the next login module in this entry, irrespective of success or failure. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
		"required": true,
    	"type": "string",
    	"@TYPEINFO": {
			"type": "enum",
    		"values": ["required", "requisite", "sufficient", "optional"],
			"multiple": true
    	},
    	"defaultValue": ["optional"]
    },
	"##publish": {
		"type": "Map",
		"required": true,
		"isHidden": true,
		"defaultValue":{
			"relation": [
				{
					"@CALCULATED": {
						"expression": "${properties.realm}:entaxy.security.jaas.realm:module:-aggregation:modules",
						"lazy": false
					}
				}
			]
		}
	}    
  },
  "outputs": {
  	"init": {
  		"fields": {
  			"objectId": {
  				"isHidden": true
  			},
  			"__objectId": {},
//			"__entaxyContainerId": {},
  			"className": {},
  			"realm": {},
  			"classifier": {},
  			"flags": {}
  		},
  		"scopes": ["public", "private"],
        "config": {
	        "configurable": false
	    }  		
  	}
  }
}
