Overview

Namespaces

  • Nethgui
    • Adapter
    • Authorization
    • Component
    • Controller
      • Collection
      • Table
    • Exception
    • Log
    • Model
    • Module
      • Help
      • Notification
    • Renderer
    • Serializer
    • System
    • Test
      • Tool
      • Unit
        • Nethgui
          • Adapter
            • ParameterSet
          • Authorization
          • Log
          • Module
            • Notification
          • Renderer
          • Serializer
          • System
          • Utility
          • View
        • Test
          • Tool
    • Utility
    • View
    • Widget
      • Xhtml
  • None
  • Test
    • Tool

Classes

  • AuthorizedModuleSet
  • JsonPolicyDecisionPoint
  • LazyAccessControlResponse
  • PolicyRule
  • User

Interfaces

  • AccessControlResponseInterface
  • AuthorizationAttributesProviderInterface
  • PolicyDecisionPointInterface
  • PolicyEnforcementPointInterface
  • UserInterface
  • Overview
  • Namespace
  • Class
  • Deprecated

Class User

Basic user properties

Nethgui\Authorization\User implements Nethgui\Authorization\UserInterface, Serializable
Namespace: Nethgui\Authorization
Author: Davide Principi davide.principi@nethesis.it
Since: 1.0
Located at Authorization/User.php
Methods summary
public
# __construct( Nethgui\Utility\SessionInterface $session, Nethgui\Log\LogInterface $log )
public
# setAuthenticationValidator( Nethgui\System\ValidatorInterface $v )
public Nethgui\Authorization\User
# setAuthenticationProcedure( callable $procedure )

Deprecated

since version 1.6.1

Parameters

$procedure

Returns

Nethgui\Authorization\User
public boolean
# hasCredential( $credentialName )

Check whether $credentialName is present or not.

Check whether $credentialName is present or not.

Returns

boolean

Api

Implementation of

Nethgui\Authorization\UserInterface::hasCredential()
public mixed
# getCredential( string $credentialName )

Authentication credentials are acquired during authentication and provide the basic informations for authorization decisions.

Authentication credentials are acquired during authentication and provide the basic informations for authorization decisions.

Parameters

$credentialName

Returns

mixed

Api

Implementation of

Nethgui\Authorization\UserInterface::getCredential()
public string
# getLanguageCode( )

The language that was choosen by the user

The language that was choosen by the user

Deprecated

since version 1.7.0

Returns

string
ISO 639-1 language code (2 characters).

Api

Implementation of

Nethgui\Authorization\UserInterface::getLanguageCode()
public string
# getLocale( )

Get the User preferred locale

Get the User preferred locale

Returns

string
RFC 4646 compliant

Api

Implementation of

Nethgui\Authorization\UserInterface::getLocale()
public Nethgui\Authorization\User
# setLanguageCode( string $lang )

Deprecated

since version 1.7.0

Parameters

$lang

Returns

Nethgui\Authorization\User
public Nethgui\Authorization\User
# setLocale( string $locale )

Parameters

$locale

Returns

Nethgui\Authorization\User

Since

1.7.0
public boolean
# authenticate( )

Authenticate the user through the given credentials.

Authenticate the user through the given credentials.

NOTE: You can pass an arbitrary number of arguments to the authentication procedure. The actual number of arguments depends on the implementation.

Returns

boolean
TRUE if authentication is successful

See

Nethgui\Authorization\User::isAuthenticated()

Api

Implementation of

Nethgui\Authorization\UserInterface::authenticate()
public boolean
# isAuthenticated( )

The authentication state

The authentication state

Returns

boolean
TRUE if authenticated, FALSE otherwise

Api

Implementation of

Nethgui\Authorization\UserInterface::isAuthenticated()
public
# setPreference( $name, $value )
public
# getPreference( $name )
public string
# asAuthorizationString( )

Convert an object to a default string representation

Convert an object to a default string representation

Returns

string
The string representing the object in authorization rules

Api

Implementation of

Nethgui\Authorization\AuthorizationAttributesProviderInterface::asAuthorizationString()
public mixed
# getAuthorizationAttribute( $attributeName )

Get the value of an attribute

Get the value of an attribute

Returns

mixed
The value of the authorization attribute

Api

Implementation of

Nethgui\Authorization\AuthorizationAttributesProviderInterface::getAuthorizationAttribute()
public
# unserialize( $serialized )

Implementation of

Serializable::unserialize()
public
# serialize( )

Implementation of

Serializable::serialize()
Constants inherited from Nethgui\Authorization\UserInterface
ID
Nethgui Framework API documentation generated by ApiGen