开发者

Prolog - Access Control?

I am currently using interprolog - which is basically java with a prolog backend, allowing both java and prolog calls from each other respectively.

Now If i had say a frontend GUI coded in java swing, say a login dialog, which requested a username an开发者_开发技巧d password, instead of using java code to authenticate and store passwords, could I somehow use prolog to check the passwords instead? I've searched the term "access control prolog" and found nothing.

Sorry, i understand this question is a big vague and foggy but any help would be appreciated.


You need to get an instance of a Prolog engine and execute any prolog command. I suppose you will have the prolog database set up in advance and you can create the prolog command that will evaluate to true when a username/password pair authenticates.

Calling this from Java is then easy. You obtain a Prolog Engine implementation say SWISubprocessEngine, and execute your prolog command with the command() method.

This article How can I make a Java program that calls Prolog ? will be most helpful.


Yes you can use that

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜