Libraries tagged by user access

daphascomp/daphascompsms

0 Favers
1 Downloads

# Authentication Requests made to our APIs must be authenticated, there are two ways to do this: 1. Authenticating using your API apiUsername and apiPassword - `Basic Auth` 2. Authenticating using an Auth Token - `Bearer Token` ## Method 1: Basic Auth Basic Authentication is a method for an HTTP user agent (e.g., a web browser) to provide a apiUsername and apiPassword when making a request. When employing Basic Authentication, users include an encoded string in the Authorization header of each request they make. The string is used by the request’s recipient to verify users’ identity and rights to access a resource. The Authorization header follows this format: > Authorization: Basic base64(apiUsername:apiPassword) So if your apiUsername and apiPassword are `onfon` and `!@pas123`, the combination is `onfon:!@pas123`, and when base64 encoded, this becomes `b25mb246IUBwYXMxMjM=`. So requests made by this user would be sent with the following header: > Authorization: Basic b25mb246IUBwYXMxMjM= | Description | | ---------------------------------------------------------------------------------------------- | | **apiUsername** `String` `Required` Your onfon account apiUsername, retrieved from portal | | **apiPassword** `String` `Required` Your onfon account apiPassword, retrieved from portal | ## Method 2: Bearer Tokens This authentication stategy allows you to authenticate using JSON Web Token ``JWT` that will expire after given duration. Each Access Token is a `JWT`, an encoded JSON object with three parts: the `header`, the `payload`, and the `signature`. The following is an example Access Token generated for Conversations > Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c ### Getting the token To generate the token, make a `POST` request to `/v1/authorization` endpoint with your `apiUsername` and `apiPassword` This request should be made from your server and not on the client side such as browser or mobile environment. You will receive a JSON similar to below: `{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "validDurationSeconds": 3600}` You can use the token received to make API calls. The token will be valid for value of `validDurationSeconds`, before which you should generate a new token. #### Request Body ``` { "apiUsername": "root", "apiPassword": "hakty11" } ``` #### Response Body ``` { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "validDurationSeconds": 3600 } ``` #### Example Curl ``` curl --location --request POST 'https://apis.onfonmedia.co.ke/v1/authorization' \ --data-raw '{ "apiUsername": "correctapiUsername", "apiPassword": "correctapiPassword" } ``` #### Making an API call You will be required to pass the token in `Authorization` header prefixed by `Bearer` when calling other endpoints. Example `Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c`

Go to Download


cosmos/rbac

0 Favers
7 Downloads

A trait for using Role-based access control in the User that a Laravel eloquent model.

Go to Download


avidbase/auth

0 Favers
3 Downloads

Provides access to authentication and user service provided by AvidBase

Go to Download


in2code/groupdelegation

1 Favers
693 Downloads

Allows generating Sub-Admin be_user by groups which can handle access of other be_user by groups

Go to Download


mouf/utils.cache.session-cache

0 Favers
11 Downloads

This package contains a cache mechanism that relies on the session of the user. Therefore, the cache is a bit special, since it is kept for the duration of the session, and is only accessible by the current user. The session has to be started (using session_start()).

Go to Download


wezanenterprises/laravelanalytics

0 Favers
139 Downloads

Simplify Google Analytics integration with Laravel using this wrapper package. Access Google Analytics data, track user interactions, and gain valuable insights effortlessly. Seamlessly integrate Google Analytics into your Laravel projects for data-driven decision-making and enhanced user experiences.

Go to Download


vardump/secretassets

0 Favers
6 Downloads

A simple plugin to restrict access to assets for permitted users only.

Go to Download


patrick-barreto/authorizer

0 Favers
15 Downloads

This repository is an Authorizer, it will provide Auth resources for an user, resources like JWT Token, Build Access-Token, and others authorization layers

Go to Download


nelson-ph/termstatus

0 Favers
8 Downloads

This module adds a status-flag to taxonomy terms. Using this flag it is possible to specify whether terms should be published or not. Users with the appropriate permission may access unpublished terms.

Go to Download


mitmelon/guard-power

2 Favers
18 Downloads

GuardPower is a sophisticated PHP library for protecting your application against bad bots, scrappers, anonymous access from tor browsers, strong user input validations, prevent DDOS Attacks and lots more features to come.

Go to Download


carawebs/wp-secure-rest-api

0 Favers
31 Downloads

A very simple mu plugin for WordPress that disallows access to REST endpoints for users that are not logged in.

Go to Download


redaigbaria/oauth2-server

0 Favers
410 Downloads

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

Go to Download


oussema-khlifi/api-rate-limiter

1 Favers
0 Downloads

API RATE LIMITER is a package that provides a middelware for laravel applications to enforce rate limiting on incoming API requests using the Token Bucket Algorithm, it helps to prevent abuse of API resources and ensures fair access to the API for all users

Go to Download


oauth/oauth2-server

0 Favers
0 Downloads

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

Go to Download


nazan/oauth2-server

0 Favers
4 Downloads

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

Go to Download


<< Previous Next >>