Authorization method

Aus Termserver-CTS2
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Building your own authorization method)
(Building your own authorization method)
Zeile 1: Zeile 1:
 
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.
 
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.
 
=Building your own authorization method=
 
=Building your own authorization method=
==Terminology Server==
+
According to your infrastructure please implement authorization methods for the following artefacts.
 +
 
 +
==Terminology Server (required)==
 
#Create a new Java file in package ''de.fhdo.terminologie.ws.authorization''
 
#Create a new Java file in package ''de.fhdo.terminologie.ws.authorization''
 
#Implement the interface ''IAuthorization'' with all of its methods
 
#Implement the interface ''IAuthorization'' with all of its methods
Zeile 13: Zeile 15:
 
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.
 
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 (optional)==
 
Same here except there will be no login procedure but you might want to show a login dialog here. Do the following steps:
 
Same here except there will be no login procedure but you might want to show a login dialog here. Do the following steps:
 
#Create a new Java file in package ''de.fhdo.authorization''
 
#Create a new Java file in package ''de.fhdo.authorization''
Zeile 22: Zeile 24:
  
 
See the file ''UsernamePasswordMethod.java'' for a sample.
 
See the file ''UsernamePasswordMethod.java'' for a sample.
==Administration==
+
==Administration (optional)==
 
Do the following steps:
 
Do the following steps:
 
#Create a new Java file in package ''de.fhdo.authorization''
 
#Create a new Java file in package ''de.fhdo.authorization''

Version vom 18. September 2014, 06:53 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

According to your infrastructure please implement authorization methods for the following artefacts.

Terminology Server (required)

  1. Create a new Java file in package de.fhdo.terminologie.ws.authorization
  2. Implement the interface IAuthorization with all of its methods
    1. method Login: logs in a user
    2. method Logout: logs out a user
    3. method Authenticate: authenticates a user, if he has logged in before
  3. 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 (optional)

Same here except there will be no login procedure but you might want to show a login dialog here. Do the following steps:

  1. Create a new Java file in package de.fhdo.authorization
  2. Implement the interface IAuthorization with all of its methods
    1. method doLogin: opens the dialog for login
    2. method doLogout: performs a logout
  3. create or edit termbrowser.properties file, specify your created class there in parameter login.classname

See the file UsernamePasswordMethod.java for a sample.

Administration (optional)

Do the following steps:

  1. Create a new Java file in package de.fhdo.authorization
  2. Implement the interface IAuthorization with all of its methods
    1. method doLogin: opens the dialog for login
    2. method doLogout: performs a logout
    3. method changePassword
    4. method createOrEditUser
    5. method resendPassword
  3. Create a new zul page with related java file for login page
  4. create or edit termadmin.properties file
    1. specify your created class there in parameter login.classname
    2. specify your login zul page in parameter login.zul

See the file UsernamePasswordMethod.java and UsernamePasswordLogin.java for a sample.

Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Werkzeuge