# \hhu\z\controllers\componentsAuthComponent

Component to handle authentication and authorization.

## Summary

Methods
Properties
Constants
load()
factory()
__construct()
setUserId()
getUserId()
No public properties found
KEY_USER_ID
No protected methods found
No protected properties found
N/A
getClassName()
No private properties found
N/A

File
  controllers/components/AuthComponent.inc
Package
  Default
Class hierarchy
  \nre\core\Component
  \hhu\z\controllers\components\AuthComponent

## Tags

author | Oliver Hanraths oliver.hanraths@uni-duesseldorf.de

## Constants

### KEY_USER_ID

    KEY_USER_ID

Key to save a user-ID as

#

## Tags

None found

## Methods

### load()

    load(string  $componentName)

Load the class of a Component.

#### Parameters

string | $componentName | Name of the Component to load

#### Throws

\nre\core\ComponentNotFoundException
\nre\core\ComponentNotValidException

#

static

Inherited from
  \nre\core\Component

## Tags

None found

### factory()

    factory(string  $componentName)

Instantiate a Component (Factory Pattern).

#### Parameters

string | $componentName | Name of the Component to instantiate

#

static

Inherited from
  \nre\core\Component

## Tags

None found

### __construct()

    __construct()

Construct a new Auth-component.

#

## Tags

None found

### setUserId()

    setUserId(integer  $userId)

Set the ID of the user that is currently logged in.

#### Parameters

integer | $userId | ID of the currently logged in user

#

## Tags

None found

### getUserId()

    getUserId() : integer

Get the ID of the user that is currently logged in.

#### Returns

integer —

ID of the currently logged in user

#

## Tags

None found

### getClassName()

    getClassName(string  $componentName) : string

Determine the classname for the given Component name.

#### Parameters

string | $componentName | Component name to get classname of

#### Returns

string —

Classname for the Component name

#

static

Inherited from
  \nre\core\Component

## Tags

None found

### AuthComponent.inc