How to use VisualGuard API |
Visual Guard for .Net allows you to secure your .Net application, it will help you to add authentication and authorization features in your application.
This documentation helps you to learn how to integrate Visual Guard in you application and describes all classes delivered with Visual Guard assemblies.
You must first integrate Visual-Guard in your application.
If you want to store your Visual Guard repository in database (Oracle, SQLServer) make sure you have read Storing a repository in a database.
If you want to integrate Visual Guard in a WinForm application, see How to integrate Visual Guard to your WinForm application.
If you want to integrate Visual Guard in an ASP.Net 2.0 application, see How to integrate Visual Guard to your WebForm 2.0 application.
If you want to integrate Visual Guard in a WCF application, see How to integrate Visual Guard to your WCF application.
If you want to understand how Visual Guard secures the object of your applications, see How Visual Guard secures an application
If you want to understand how to apply security in your application, see How to apply security in your application.
If you want to understand how to deploy a repository, see How to deploy a repository.
You can also examine the sample project sources installed with Visual Guard.
If you have a problem during the installation or when you use Visual Guard, you can consult the FAQ or contact our support at support@visual-guard.com
Visual Guard API is a very rich set of functionalities. By using it, You can perform all the operations same like WinConsole or WebConsole.
Note |
---|
You must add 'Novalys.VisualGuard.Security.dll' and VisualGuard configuration files in your project to perform any Visual Guard API operation. |
Note |
---|
User must have enough rights for executing Visual Guard operations via API. Example: To update a user, user must have the "CanUpdateUser" permission. |
There are 2 main entry point classes to deal with Visual Guard Security.
Common Format to perform any VisualGuard operation on any entity.
VGSecurityManager.Runtime.<Entity>.<Action>
Here, <Entity> can be - VGGroupsInstance , VGRolesInstance, VGPermissionSetsInstance, VGPermissionInstance, VGMembershipInstance, VGRepositoryInstance
And, <Action> can be - any operations for above entities. (ex. CreateGroup/UpdateGroup , CreateRole/UpdateRole, CreateUser, etc)
Example. If you want to create new Role.
VGSecurityManager.Runtime.<Entity>.<Action>
Here, Entity = 'Role' and Action = 'CreateNewRole'
VGSecurityManager.Runtime.Roles.CreateNewRole("NewRole");