Authorization method
Aus Termserver-CTS2
(Unterschied zwischen Versionen)
(→Terminology Server) |
|||
Zeile 2: | Zeile 2: | ||
=Building your own authorization method= | =Building your own authorization method= | ||
==Terminology Server== | ==Terminology Server== | ||
+ | #Create a new Java file in package ''de.fhdo.terminologie.ws.authorization'' | ||
+ | #Implement the interface ''IAuthorization'' with all of its methods | ||
+ | ##method ''Login'': logs in a user | ||
+ | ##method ''Logout'': logs out a user | ||
+ | ##method ''Authenticate'': authenticates a user, if he has logged in before | ||
+ | #create or edit [[termserver.properties]] file, specify your created class there in parameter ''login.classname'' | ||
+ | |||
+ | See the file ''UsernamePasswordMethod.java'' for a sample. | ||
+ | |||
+ | That's it. If you want to use an authorization before the Terminology Server, just follow the steps above and do a successful login every time or dependent on the user id, for example. | ||
+ | |||
==Terminology Browser== | ==Terminology Browser== | ||
==Administration== | ==Administration== |
Version vom 18. September 2014, 06:44 Uhr
Authorization is needed in some services of the Terminology Server like services in Authoring or Administration. The default method is a combination with username and password. However, you can add your own authorization method and parametrize it in the settings. This page will help you creating your own authorization method.
Inhaltsverzeichnis |
Building your own authorization method
Terminology Server
- Create a new Java file in package de.fhdo.terminologie.ws.authorization
- Implement the interface IAuthorization with all of its methods
- method Login: logs in a user
- method Logout: logs out a user
- method Authenticate: authenticates a user, if he has logged in before
- create or edit termserver.properties file, specify your created class there in parameter login.classname
See the file UsernamePasswordMethod.java for a sample.
That's it. If you want to use an authorization before the Terminology Server, just follow the steps above and do a successful login every time or dependent on the user id, for example.