# Using Advanced Security in Application Pages

Advanced security makes it easier for developers to enforce application security. After your administrator sets up the appropriate security contexts for your application, you can start using ColdFusion security tags and functions to authenticate users and see if they've been authorized for the part of the application they're trying to access.

This section describes how to use security tags and functions to authenticate users and provide or withhold resources according to the security context's rules.

- Include CFAUTHENTICATE on any application page where you want to authenticate users -- that is, to make sure users are who they say they are. (You can also use CFAUTHENTICATE your application's `Application.cfm` file.) Pass the authentication information to subsequent pages where you want to test for authentication.

  ColdFusion sets a cookie, CFAUTH, to contain authentication information. If you choose not to use this cookie, you must check authentication for each request.

- Use the IsAuthenticated function to check if the current user is authenticated.
- Use the IsAuthorized function to check if the user is authorized to access resources. This function lets developers offer or deny access to protected resources based on a user's authorization level, which is determined by already-established security contexts.
- Use the CFIMPERSONATE tag wherever you want to provide a greater level of access than is otherwise assigned to a particular user.

Read the section "Example of User Authentication and Authorization" to see code examples that show how these tags functions work in ColdFusion applications.

To learn about syntax and usage for the CFAUTHENTICATE and CFIMPERSONATE tags, and the IsAuthenticated and IsAuthorized functions, See the CFML Language Reference.

### Encrypting application pages

For an added measure of security, you can encrypt strings in your applications using the Encrypt and Decrypt functions. See the CFML Language Reference for descriptions of these functions.