PHPackages                             ifaniqbal/myits-oidc-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ifaniqbal/myits-oidc-laravel

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

ifaniqbal/myits-oidc-laravel
============================

Laravel wrapper for myits/openid-connect-client

0.1.3(5y ago)033MITPHPPHP ^7.2

Since Nov 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ifaniqbal/myits-oidc-laravel)[ Packagist](https://packagist.org/packages/ifaniqbal/myits-oidc-laravel)[ RSS](/packages/ifaniqbal-myits-oidc-laravel/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Laravel wrapper for MyITS OpenID Connect
========================================

[](#laravel-wrapper-for-myits-openid-connect)

The purpose of this package is to simplify the implementation of MyITS SSO on the Laravel project. Currently support Laravel 5.1, 5.5 and 6.x.

Installation
------------

[](#installation)

```
composer require ifaniqbal/myits-oidc-laravel
```

If using Laravel 5.1, include the service provider within `config/app.php`.

```
'providers' => [
    'Ifaniqbal\MyitsOidc\MyitsOidcServiceProvider',
];
```

Add a facade alias to this same file at the bottom:

```
'aliases' => [
    'MyitsOidc' => 'Ifaniqbal\MyitsOidc\Facades\MyitsOidc',
];
```

Configuration
-------------

[](#configuration)

These are list of `.env` keys that can be configured:

```
MYITS_OIDC_ID= # client ID
MYITS_OIDC_SECRET= # client secret
MYITS_OIDC_REDIRECT_PATH= # redirect path, default: /myits-sso
MYITS_OIDC_AUTH_ENDPOINT= # authorization endpoint, default: https://my.its.ac.id
MYITS_OIDC_SCOPE= # scope, default: 'profile role openid'
MYITS_OIDC_API_AUTH_ENDPOINT= # API auth endpoint, default: the value of MYITS_OIDC_AUTH_ENDPOINT
MYITS_OIDC_API_CLIENT_ID= # API client ID, default: the value of MYITS_OIDC_ID
MYITS_OIDC_API_CLIENT_SECRET= # API client secret, default: the value of MYITS_OIDC_SECRET
```

For example in `production` if most of the values you need is same as default values, configure only these values within your `.env` file:

```
MYITS_OIDC_ID=
MYITS_OIDC_SECRET=
```

And for `local` development, configure these values within your `.env` file:

```
MYITS_OIDC_ID=
MYITS_OIDC_SECRET=
MYITS_OIDC_REDIRECT_PATH=
MYITS_OIDC_AUTH_ENDPOINT=
MYITS_OIDC_API_CLIENT_ID=
MYITS_OIDC_API_CLIENT_SECRET=
```

Usage
-----

[](#usage)

This is an example which handle request from `MYITS_OIDC_REDIRECT_PATH`:

```
