空手道版本:0.6.0 Java 版本:1.8 我已将范围名称(生成令牌所需的)放在一个 json 文件中。
{"scopeFoo": "foo",
"scopeBar": "bar",
"scopeRead": "read",
"scopeWrite": write}
在空手道功能中,我想拥有
* def sc = read(scopes.json)
* form field scope = "foo bar read write"
当我做:
* def sc = read(scopes.json)
* form field scope = sc.scopeFoo + sc.scopeBar + sc.scopeRead + sc.scopeWrite
它不起作用。即使没有空格:
* form field scope = sc.scopeFoo+sc.scopeBar+sc.scopeRead+sc.scopeWrite
怎么了?谢谢,我可以在我的功能中访问 scopes.json 文件,因为它只有一个作用域