DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: doccheck

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2009-05-15T23:46:07
Author:Thorsten Greiner
Email:tgr@tgrworx.net
Info 3:
Info 4:

EXT: doccheck

Extension Key: tgr_doccheck

Copyright 2000-2009, Thorsten Greiner, <tgr@tgrworx.net>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: doccheck 1

Introduction 1

What does it do? 1

Users manual 2

Install and include static 2

Setup globally 3

Setup per instance 4

Adminstration 5

Setup URL for redirection 5

Using dcHash 5

Configuration 5

Reference 5

FAQ 5

Tutorial 6

Known problems 6

To-Do list 6

Changelog 6

Introduction

What does it do?

  • Integrate DocCheck-Authentication into TYPO3
  • Log in using TYPO3 website-users (fe_users) . This is done by logging in a dummy user on successful authentication by DocCheck.
  • Additional security on manual pagecall (i.e guessing the page) by using a hash or likewise.
  • DocCheck-Account is required. Go to http://www.doccheck.com for information.

Users manual

Install

Install from Extensionmanager.

Setup globally

Go to the constant-editor of your root-template or an extension- template and edit the following fields if desired.

img-1

You can setup a pid as startingpoint for fe_user lookup, choose a dummy-user and dummy-password, setup your Login ID you received from DocCheck, choose a pid as target on successful authentication. The template-file path usually shouldn't need to be changed. For information on Key Hash see Administration.

Setup per instance

On the other hand you can setup each instance of the extension. After inserting the plugin on the page, you can set it up by editing the general properties:

img-2

And the advanced properties if needed:

img-3

After you've gone through these steps, the page you inserted the plugin should display a form according to the layout selected. For an overview of the four possible layouts go to http://www2.doccheck.com/redirect/htmlcode_de/

Adminstration

Setup URL for redirection

If you are using DocCheck, you have to setup a target URL in the webmasters lounge on DocCheck. After you successfully authenticate, you are redirected to the page entered there.

img-4

To use this extension you will need to setup the redirect-page on DocCheck like this:

http://www.meinedomain.com/index.php?id=123&tx_tgrdoccheck_pi1[dc]=1

or

http://www.mydomain.com/page-with- extension.html?tx_tgrdoccheck_pi1[dc]=1 if you are using simulate static documents.

Shouldn't be too difficult to configure with realurl.

Using key hash

If you want it a little more secure, you can use key hash (see user manual). URLs will have to look like this:

http://www.meinedomain.com/index.php?id=123&tx_tgrdoccheck_pi1[keyHa sh]=9835ab4bd87c0980a09f8g54

or

http://www.meinedomain.com/page-with- extension.html?tx_tgrdoccheck_pi1[keyHash]=9835ab4bd87c0980a09f8g54 if you are using simulate static documents.

Important: The target URL has to be the page with the extension on. Otherwise TYPO3 can not log the dummy user in. If you need redirection to a subpage for example, use successPid or Target PID in the advanced extension settings

Configuration

Reference

templateFile

Property

templateFile

Data type

string

Description

Template for the DocCheck form (shouldn't be changed)

Default

pid

Property

pid

Data type

int

Description

Id of the page/sysfolder that holds the dummyuser

Default

dummyUsername

Property

dummyUsername

Data type

string

Description

Username of the fe_user for the login procedure

Default

doccheckUser

dummyPassword

Property

dummyPassword

Data type

string

Description

Password of the fe_user for the login procedure

Default

doccheckPass

loginID

Property

loginID

Data type

int

Description

loginID received by DocCheck, that identifies the account

Default

parentNotTop

Property

parentNotTop

Data type

bool

Description

Use _parent as target instead of _top. Usefull in framesets

Default

0

loginLayout

Property

loginLayout

Data type

string

Description

One of XL, L, M, S

Default

XL

keyHash

Property

keyHash

Data type

string

Description

A md5 Hash used as key

Default

language

Property

language

Data type

string

Description

Language setting:de, com, fr, nl, befr, benl, chde, chfr, it, es

Default

de

successPid

Property

successPid

Data type

int

Description

Id of the page to redirect to, after successful authentication

Default

FAQ

Q: The extension says: There's no user setup for this plugin/plugin- instance!A: The extension checks, if the dummyuser and dummypassword are correct. If not, the message is displayed. So check your settings.

Q: The extension says: No necessary vars given!A: In normal operation the extension waits for the var tx_tgrdoccheck_pi1[dc]=1. If it is not present either the form is displayed or, if other vars than 'dc' are used, the above message. If you are using keyHash the extension waits for tx_tgrdoccheck_pi1[keyHash]=<Hash>

Q: The extension says: The vars given do not compare. No login possible!A: This message is displayed if you are using keyHas and the hash provided by tx_tgrdoccheck_pi1[keyHash] does not compare to the configured value.

Q: How can I log out?A: Well, either you simply close your browser, or you add a menuitem with an extra parameter &logintype=logout

Tutorial

Here's a snippet of how to setup a TMENU with redirection to a login page.

Imagine you have a page with products and they are access-restricted. If someone clicks that page, he should be redirected to a page with this extension on.

::

a

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:

b

lib.menu >
lib.menu = HMENU
lib.menu.1 = TMENU
lib.menu.1.wrap = <ul>|</ul>
lib.menu.1 {
  showAccessRestrictedPages = 18
  NO {
    stdWrap.cObject = COA
    stdWrap.cObject {
      10 = TEXT
      10.field = title
    }
    allWrap = <li>|</li>
    stdWrap.htmlSpecialChars = 1
    before.cObject = COA
    before.cObject {
      wrap = |&#32;
      10 = IMAGE
      10 {
          file = fileadmin/templates/images/locked.gif
          altText = Kein Zugriff
          params = align="absmiddle"
      }
      if {
        isTrue.field = fe_group
      }
    }
  }
  ACT = 1
  ACT {
    stdWrap.cObject = COA
    stdWrap.cObject {
      10 = TEXT
      10.field = title
    }
    allWrap = <li>|</li>
    stdWrap.htmlSpecialChars = 1
  }
}

[loginUser = *]
lib.menu.1.NO.before.cObject >
[global]

In line 6 there's the id of the login-page, say the page with this extension on. The COA starting on line 15 checks, if the page is restricted. In case a fe_group is set it is. Then a little lock is displayed.

So... if someone clicks on that menuitem, he is redirected to page id 18 (the page with this extension on). If he is successfully authenticated, he may be redirected to the successPid set in the extension.

If we are logged in we don't want to display a lock anymore. So in line 41 we check this an clear the object containing the image.

Easy... isn't it... :)

Known problems

– Conflicts with extensions using md5 passwords for fe_users like kb_md5fepw

To-Do list

  • Add support for md5 passwords
  • Add some log out stuff

Changelog

1.0.0 Initial release

1.0.1 Some template errors corrected

1.0.2 Corrected a typo in configuration

2.0.0 Rewrote the extension for actual DocCheck preferences

img-5 EXT: doccheck - 7