PHPackages                             brlab-inc/oauth2-asmile - 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. brlab-inc/oauth2-asmile

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

brlab-inc/oauth2-asmile
=======================

ASMILE OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1.2(6y ago)07MITPHP

Since Nov 11Pushed 5y agoCompare

[ Source](https://github.com/brlab-inc/oauth2-asmile)[ Packagist](https://packagist.org/packages/brlab-inc/oauth2-asmile)[ RSS](/packages/brlab-inc-oauth2-asmile/feed)WikiDiscussions develop Synced 1mo ago

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

ASMILE Provider for OAuth 2.0 Client
====================================

[](#asmile-provider-for-oauth-20-client)

[![License](https://camo.githubusercontent.com/61a777322f593e21e4d6b9d4fe65ffc48688a66a6a5ef14a2cc08addf13376a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c65616775652f6f61757468322d676f6f676c652e737667)](https://github.com/tavii/oauth2-yconnect/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/ef91fa1405acf3ad0d77074e05960ffb6f0a577bea522f90c8fcd1c859c8f4e3/68747470733a2f2f7472617669732d63692e6f72672f74617669692f6f61757468322d79636f6e6e6563742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tavii/oauth2-yconnect)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e8b501e66b8c7d96c628afeffd581c9748ca6abeb4cf7e6e06c04bfe16ef25f7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74617669692f6f61757468322d79636f6e6e6563742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tavii/oauth2-yconnect/?branch=master)

This package provides ASMILE OAuth2.0 support for the PHP League's [ OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

Installation
============

[](#installation)

To install, use composer.

```
$ composer require brlab-inc/oauth2-asmile

```

Usage is the same as The League's OAuth client, using \\BRlab\\OAuth2\\Client\\Provider\\YConnect as the provider.

```
$provider = new BRlab\OAuth2\Client\Provider\YConnect([
    'clientId'          => '{yconnect-client-id}',
    'clientSecret'      => '{yconnect-client-secret}',
    'redirectUri'       => 'https://example.com/callback-url',
]);

if (!isset($_GET['code'])) {

    // If we don't have an authorization code then get one
    $authUrl = $provider->getAuthorizationUrl();
    $_SESSION['oauth2state'] = $provider->getState();
    header('Location: '.$authUrl);
    exit;

// Check given state against previously stored one to mitigate CSRF attack
} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {

    unset($_SESSION['oauth2state']);
    exit('Invalid state');

} else {

    // Try to get an access token (using the authorization code grant)
    $token = $provider->getAccessToken('authorization_code', [
        'code' => $_GET['code']
    ]);

    // Optional: Now you have a token you can look up a users profile data
    try {

        // We got an access token, let's now get the user's details
        $user = $provider->getResourceOwner($token);

        // Use these details to create a new profile
        printf('Hello %s!', $user->getNamex());

    } catch (Exception $e) {

        // Failed to get user details
        exit('Oh dear...');
    }

    // Use this to interact with an API on the users behalf
    echo $token->getToken();
}

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 76.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~499 days

Total

3

Last Release

2467d ago

Major Versions

0.1.1 → 1.22019-08-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/42ebf08abc50197ebdd501ffe1bce18b1f3a264aec94b8d8315bd0e04110d12a?d=identicon)[yamato-brl](/maintainers/yamato-brl)

---

Top Contributors

[![polidog](https://avatars.githubusercontent.com/u/284778?v=4)](https://github.com/polidog "polidog (16 commits)")[![svartowl](https://avatars.githubusercontent.com/u/1082409?v=4)](https://github.com/svartowl "svartowl (4 commits)")[![yamato-brl](https://avatars.githubusercontent.com/u/36683806?v=4)](https://github.com/yamato-brl "yamato-brl (1 commits)")

---

Tags

clientoauthoauth2authorizationauthorisationyahooyconnectyahoojapan

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brlab-inc-oauth2-asmile/health.svg)

```
[![Health](https://phpackages.com/badges/brlab-inc-oauth2-asmile/health.svg)](https://phpackages.com/packages/brlab-inc-oauth2-asmile)
```

###  Alternatives

[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1132.5M6](/packages/patrickbussmann-oauth2-apple)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

251.7M1](/packages/mollie-oauth2-mollie-php)[omines/oauth2-gitlab

GitLab OAuth 2.0 Client Provider for The PHP League OAuth2-Client

36721.5k13](/packages/omines-oauth2-gitlab)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
