Authentication And Authorization Functions; Using The Isauthenticated Function; Using The Isauthorized Function - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

360

Authentication and Authorization Functions

After you use
security context, you can use the following security functions throughout your
applications any time you need to authenticate or authorize a user:

Using the IsAuthenticated function

The
executed for the current request. If not, it looks for the
whether the user is authenticated. If you do not set a
cfauthenticate
The
current request; otherwise, it returns False.
If you call
the function returns True if the user is authenticated in the named security context;
otherwise it returns False. The
IsAuthenticated("security_context_name")

Using the IsAuthorized function

After a user is authenticated, you can use the
resources the user is allowed to access. You define authorization levels when you
create security policies on the Advanced Security page of the ColdFusion
Administrator.
IsAuthorized
on the specified ColdFusion resource.
follows:
IsAuthorized(ResourceType, ResourceName, [ResourceAction])
For example, to check whether the authenticated user is authorized to update a data
source resource called orders, use this syntax:
IsAuthorized("Datasource", "orders", "update")
In this example, the
update the named data source, or if the data source is not protected in the security
context.
cfauthenticate
checks whether the current session was authenticated by the
IsAuthenticated
tag.
cfauthenticate
checks whether the authenticated user has access to the named
IsAuthorized
resource, based on rules defined in the security context for which the user is
authenticated.
function checks whether a
IsAuthenticated
, you must call
function returns True if the user is authenticated for the
IsAuthenticated
IsAuthenticated with
returns True if the user is authorized to perform the specified action
IsAuthorized
to check whether the user is defined for a particular
cfauthenticate
for every request in the application.
cfauthenticate
the optional security_context_name parameter,
function has the following form:
IsAuthenticated
IsAuthorized
IsAuthorized
function returns True if the user is authorized to
Chapter 19 Application Security
tag successfully
cookie to determine
cfauth
cookie with
cfauth
function to check which
takes three parameters, as

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents