2017 © Pedro Peláez
 

library railt-authorization

Railt authorization extension for Laravel Framework

image

serafim/railt-authorization

Railt authorization extension for Laravel Framework

  • Thursday, March 15, 2018
  • by Serafim
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 100 % Grown

The README.md

Railt Authorization

Your application should use the Laravel Provider, (*1)

Installation

  • composer require serafim/railt-authorization
  • Add into config/railt.php:
    ...
    'extensions' => [
        \Serafim\RailtAuthorization\AuthorizationExtension::class, 
    ]

Usage

Authenticated

The field that contains the directive @auth is only available to an authenticated user., (*2)

type Example {
    field: Result! @auth
}

Guest

The field that contains the directive @guest is only available to a guest (non-authenticated user)., (*3)

type Example {
    field: Result! @guest
}

Authorization

The field that contains the directive @can(role: String!): 1. Is only available to an authenticated user. 2. Should pass the authorization gate defined in role argument., (*4)

type Example {
    field: Result! @can(role: "some")
}

The Versions

15/03 2018

dev-master

9999999-dev

Railt authorization extension for Laravel Framework

  Sources   Download

MIT

The Requires