Authorization Agent

1) Vista

These are the operations that are directly involved in Application¹ and User¹ authorization.

The authorization agent is responsible for providing easy access to the following Authorization Service operations:
  • Authorization of Applications
  • Authorization of Users
The purpose of this agent is to provide the users of Digital Fortress with an easier approach to Authorization operations.

2) Data Contracts

(Due to CodePlex limitations we're not allowed to show the same image as in Administration Agent. Please help us change it and vote in this workitem: Linking to images outside of the Wiki?)

3) Operations

3.1) Boolean Application.HasRole(Guid roleId)

Description

This method is responsible for testing if an Application¹ has the supplied Role in it's own context.

Parameters

  • Guid roleId - A Role General Unique Identifier.

Returns

  • Boolean - Returns true if the Application has the supplied Role.

Dependencies

Test Suite:

  1. Test if the Application has an existing Role.
  2. Test if the Application does not has an existing Role.
  3. Test passing an inexistent Role, resulting in an expected fault (RoleNotFoundFault).

3.2) Boolean Application.HasRole(string roleName)

Description

This method is responsible for testing if an Application¹ has the supplied Role in it's own context.

Parameters

  • String roleName - The name of an Existing Role.

Returns

  • Boolean - Returns true if the Application has the supplied Role.

Dependencies

Test Suite:

  1. Test if the Application has an existing Role.
  2. Test if the Application does not has an existing Role.
  3. Test passing an inexistent Role, resulting in an expected fault (RoleNotFoundFault).

3.3) Boolean Application.HasRole(Guid [] role)

Description

This method is responsible for testing if an Application¹ has ALL supplied Roles in it's own context.

Parameters

  • Guid[] role - An Array of Guid of Roles.

Returns

  • Boolean - Returns true if the Application has ALL supplied Roles.

Dependencies

Test Suite:

  1. Test if the Application has ALL supplied Roles.
  2. Test if the Application does not have ALL supplied Roles.
  3. Test passing an inexistent Role in the role Array, resulting in an expected fault (RoleNotFoundFault).

3.4) Boolean Application.HasRole(String[] role)

Description

This method is responsible for testing if an Application¹ has ALL supplied Roles in it's own context.

Parameters

  • String[] role - An Array of Role Name.

Returns

  • Boolean - Returns true if the Application has ALL supplied Roles.

Dependencies

Test Suite:

  1. Test if the Application has ALL supplied Roles.
  2. Test if the Application does not have ALL supplied Roles.
  3. Test passing an inexistent Role in the role Array, resulting in an expected fault (RoleNotFoundFault).

3.5) Boolean User.HasRole(Guid roleId)

Description

This method is responsible for testing if an User¹ has the supplied Role.

Parameters

  • Guid roleId - A Role General Unique Identifier.

Returns

  • Boolean - Returns true if the User has the supplied Role.

Dependencies

Test Suite:

  1. Test if the User has an existing Role.
  2. Test if the User does not has an existing Role.
  3. Test passing an inexistent Role, resulting in an expected fault (RoleNotFoundFault).

3.6) Boolean User.HasRole(string roleName)

Description

This method is responsible for testing if an User¹ has the supplied Role.

Parameters

  • String roleName - The name of an Existing Role.

Returns

  • Boolean - Returns true if the User has the supplied Role.

Dependencies

Test Suite:

  1. Test if the User has an existing Role.
  2. Test if the User does not has an existing Role.
  3. Test passing an inexistent Role, resulting in an expected fault (RoleNotFoundFault).

3.7) Boolean User.HasRole(Guid[] role)

Description

This method is responsible for testing if an User¹ has ALL supplied Roles in it's own context.

Parameters

  • Guid[] role - An Array of Guid of Roles.

Returns

  • Boolean - Returns true if the User has ALL supplied Roles.

Dependencies

Test Suite:

  1. Test if the User has ALL supplied Roles.
  2. Test if the User does not have ALL supplied Roles.
  3. Test passing an inexistent Role in the role Array, resulting in an expected fault (RoleNotFoundFault).

3.8) Boolean User.HasRole(String[] role)

Description

This method is responsible for testing if an User¹ has ALL supplied Roles in it's own context.

Parameters

  • String role[] - An Array of Role Name.

Returns

  • Boolean - Returns true if the User has ALL supplied Roles.

Dependencies

Test Suite:

  1. Test if the User has ALL supplied Roles.
  2. Test if the User does not have ALL supplied Roles.
  3. Test passing an inexistent Role in the role Array, resulting in an expected fault (RoleNotFoundFault).

¹Please refer to the Data Contracts image for clarifications on this contract.

Last edited Jun 26, 2007 at 12:29 AM by jcfigueiredo, version 7

Comments

No comments yet.