The api help to manage wso2 users from laravel application

Overview

Laravel WSO2 Identity API User

This is a Laravel library to manage WSO2 IDP users.

Installation

You can install the package via composer:

composer require khbd/laravel-wso2-identity-api-user

The package will register itself automatically.

Then publish the package configuration file

php artisan vendor:publish --provider=Khbd\LaravelWso2IdentityApiUser\IdpServiceProvider

or

php artisan vendor:publish --provider=Khbd\LaravelWso2IdentityApiUser\IdpServiceProvider  --tag="idpuser"

Usage

Check the config file of all variables required, and then

(new IdpUser())->create(array());

or using Facade

IdpUser::create(array());

or using helper

IdpUser()->create(array());

Create you SDK

Run this command to create your own sdk class.

 php artisan make:idpdriver YourSDKName

Now add the class in config idpUser.php config file.

API references

Here all covered API references

  1. Get Wso2 IDP User by ID
IdpUser()->setPayload('userID')->userInfo()->get();

or to get only response body

IdpUser()
->use('wso2idp')
->setPayload('userID')
->userInfo()
->onlyBody()
->get();

Here -


use('yourSDK') optional set your custom SDK.

onlyBody() optional return only response from IDP server/end API


get() return response as array

asObject() return response as object

asJson() return response as json


  1. Create IDP user and get created user info
        $response = IdpUser()->setPayload([
        'first_name' => 'Kalyan',
        'last_name' => 'Kalyan',
        'username' => 'Kalyan4',
        'email' => '[email protected]',
        'mobile' => '01945602071',
        'user_type' => '2',
        'active' => true,
        'department' => 'Kalyan',
        ])->create()->get();
  1. Update User By User ID

you can provide single field or multiple field at the same time

        $response = IdpUser()->setPayload([
        'id' =>'UserID',
        'username' => 'Kalyan3',
        'account_status' => 1,
        'mobile' => '01945602071'
        ])->update()->get();

here id and username is mendatory. You can provide following field to update & create -

Key Details
first_name Update givenName
last_name [Update familyName
email Update emails
mobile Update phoneNumbers
user_type Update userType
account_status Update accountStatus
department Update department
organization Update organization
country Update country
password Update password
  1. Delete single/bulk IDP User
        $userID = 'ID';
        $response = IdpUser()
        ->use('wso2idp')
        ->setPayload($userID)
        ->delete()
        ->get();

here - $userID can be single user ID or array of user ID.

Adding new Gateway

.env Config

Currently Default SMS Gateway is Bangladesh SMS

So .env config is following -

DEFAULT_IDP = 'wso2idp' #set default idp 

# add your wso2 idp information
WSO2_IDP_BASE_URL = 'http://wso2.com'
WSO2_IDP_USERNAME = 'admin'
WSO2_IDP_PASSWORD = 'admin'

IDP_ENABLED = true # true = if you want to enable functionality of idp
IDP_USER_DEBUG = true  # true = if you want to save log in file

Contributing

Suggestions, pull requests , bug reporting and code improvements are all welcome. Feel free.

TODO

Write Tests

Credits

License

The MIT License (MIT). Please see License File for more information.

You might also like...
Your users do not always report errors, LaraBug does. LaraBug is a simple to use and implement error tracker built for the Laravel framework.
Your users do not always report errors, LaraBug does. LaraBug is a simple to use and implement error tracker built for the Laravel framework.

Your users do not always report errors, LaraBug does. LaraBug is a simple to use and implement error tracker built for the Laravel framework. This rep

Laravel plugin to track your users logins and alert when a suspicious login occurs
Laravel plugin to track your users logins and alert when a suspicious login occurs

Laravel Suspicious Logins Detect suspicious logins for standard Laravel authentication (base Laravel, Jetstream, etc) and notify a list of administrat

Laravel 5 Package to Detect Users Browsers, Devices, Languages and Operating Systems

laravel-identify Laravel 5 Package to identify a User's Browser, Operating System, Language and Device Installation PHP 7.1+ or HHVM 3.3+, and Compose

Laravel package for giving admin-created accounts to users via 'set-password' email.

Invytr When making a website where users are created instead of registering themselves, you are faced with the challenge of safely giving users the ac

A Laravel 5.1 ORM example with Nerds as users.

laravel-nerds A Laravel 5.1 ORM example with Nerds as users. App Features Show all Nerds Add a Nerd Edit a Nerd Delete a Nerd Keeps Nerd's Name Keeps

Durable workflow engine that allows users to write long running persistent distributed workflows in PHP powered by Laravel queues

Durable workflow engine that allows users to write long running persistent distributed workflows (orchestrations) in PHP powered by Laravel queues. Inspired by Temporal and Azure Durable Functions.

PHP package to help the development of Laravel-based Telegram bots
PHP package to help the development of Laravel-based Telegram bots

Laravel-telegram-bot Project description goes here. This description is usually two to three lines long. It should give an overview of what the projec

this package can help you to test race condition in Laravel Feature Test
this package can help you to test race condition in Laravel Feature Test

Laravel Async Testing this package can help you to test race condition in Laravel Feature Test Requirements Laravel versions 5.7, 6.x, 7.x and 8.x PHP

Laravel Livewire package for clone screen with the help of websocket

screen-wire This is a Laravel Livewire package. It allow you to see what users are doing on their screen. Installation composer require mrbohem/scree

Releases(v0.0.9)
Owner
Kalyan Halder Raaz
Kalyan Halder Raaz
laravel package help you to implement geographical calculation, with several algorithms that help you deal with coordinates and distances.

Geographical Calculator Geographical Calculator was developed for laravel 5.8+ to help you to implement geographical calculation, with With several al

karam mustafa 342 Dec 31, 2022
This package should help you with creating and managing a Laravel DDD Application

This package should help you with creating and managing a Laravel DDD Application. This package is heavily inspired by "Laravel beyond CRUD" from Spatie.

J. Regner 158 Dec 25, 2022
Electrik is a full-featured, open-source, starter-kit to help you build you your SaaS application.

Electrik Electrik is a full-featured and open-source stater-kit for for your next SaaS application. It's built on top of Laravel, Livewire, neerajsoha

Electrik 129 Dec 31, 2022
A simple package to manage the creation of a structure composed of the service and repository layers in a Laravel application

Chapolim Este projeto tem como objetivo fornecer alguns comandos adicionais à interface de linha de comando do Laravel, o Artisan, para manipular a es

Eliezer Alves 51 Dec 11, 2022
This package aims to help you standardize all your API responses in a simple and structured way.

Laravel API Response This package aims to help you standardize all your API responses in a simple and structured way. By default, the stucture of the

Kode Pandai 6 Dec 6, 2022
Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

null 9 Dec 14, 2022
Laravel Query Helper was developed for laravel 7.2+ to help you optimize sql queries

Laravel Query Helper Laravel Query Helper was developed for laravel 7.2+ to help you optimize sql queries, this package will contain all advanced SQL

Syrian Open Source 15 Nov 20, 2022
Laravel Impersonate is a plugin that allows you to authenticate as your users.

Laravel Impersonate Laravel Impersonate makes it easy to authenticate as your users. Add a simple trait to your user model and impersonate as one of y

404lab 1.6k Dec 30, 2022
Talk is a real-time users messaging and chatting system Laravel.

Laravel-Talk Talk is a Laravel 5 based user conversation (inbox) system with realtime messaging. You can easily integrate this package with any Larave

Nahid Bin Azhar 1.5k Dec 30, 2022
A simple Content Moderation System for Laravel 5.* that allows you to Approve or Reject resources like posts, comments, users, etc.

Laravel Moderation A simple Moderation System for Laravel 5.* that allows you to Approve or Reject resources like posts, comments, users, etc. Keep yo

Alex Kyriakidis 509 Dec 30, 2022