Download the PHP package uptd-pelita/sso-broker-sdk without Composer

On this page you can find all versions of the php package uptd-pelita/sso-broker-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sso-broker-sdk

SSO Broker SDK for Bali Province Applications

A Laravel package for integrating Single Sign-On (SSO) authentication with Bali Province SSO Server.

Requirements

Installation

Via Composer (Private GitLab Repository)

Since this is a private repository, you need to configure Composer to access it.

Step 1: Run composer update:

Using Tagged Versions (Recommended for Production)

Once tags are created in the repository, use specific versions:

To create a version tag:

Configuration

1. Publish Configuration

2. Environment Variables

Add the following to your .env file:

3. Optional: Publish Routes

If you want to customize routes:

Then set SSO_LOAD_DEFAULT_ROUTES=false in your .env file.

Basic Usage

Protecting Routes with Middleware

Using the Facade

Manual Authentication in Controller

Extending the SDK

Custom Controller

Create a custom controller that extends the base:

Custom SSO Manager

Create a custom manager with additional functionality:

Register your custom manager in a service provider:

Using with Local User Model

Add the HasSSOAuthentication trait to your User model:

Usage:

Custom Routes

Disable default routes and define your own:

Custom Middleware

Extend the middleware for custom behavior:

Register in app/Http/Kernel.php:

Default Routes

Method URI Name Description
GET/POST /sso/authenticate sso.authenticate Initiate SSO login
GET /auth-data/{authData?} sso.callback SSO callback (token in URL path or query string)
POST /sso/logout sso.logout Logout callback from SSO
GET /logout sso.user-logout User-initiated logout
GET /sso/check sso.check Check auth status (API)
GET /sso/user sso.user Get user data (API)

Configuration Options

Key Description Default
sso_domain SSO server URL https://sso.baliprov.go.id
broker_code Broker identifier ''
jwt_secret JWT secret key SSO-JWT-SECRET-KEY
callback_route Callback URL path /auth-data
redirect_after_login Post-login redirect /
redirect_after_logout Post-logout redirect /
not_authorized_route Unauthorized route name not-authorized
load_default_routes Load default routes true
route_prefix Route prefix ''
route_middleware Route middleware ['web']
http_timeout HTTP request timeout 30
verify_ssl Verify SSL certificates true

Helper Methods

JWT Class

Migration Example

Create a migration for the sso_user_id column:

Troubleshooting

"Invalid browser session" Error

This occurs when the session ID doesn't match. Ensure:

  1. Sessions are properly configured
  2. The same domain is used for login and callback
  3. Session middleware is applied to SSO routes

SSL Certificate Issues

In development, you can disable SSL verification:

Never disable in production!

Custom Session Driver

If using a custom session driver, ensure it's properly configured before SSO routes are accessed.

License

MIT License. See LICENSE for details.

Contributing

Contributions are welcome! Please submit pull requests with tests.

Support

For issues and questions, please open an issue on the repository.


All versions of sso-broker-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
guzzlehttp/guzzle Version ^6.0|^7.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package uptd-pelita/sso-broker-sdk contains the following files

Loading the files please wait ...