Swiftpack.co - Package - nodes-vapor/admin-panel-nodes-sso

Admin Panel Nodes SSO 🔑

Swift Version Vapor Version Circle CI codebeat badge codecov Readme Score GitHub license

📦 Installation

Update your Package.swift file.

.package(url: "https://github.com/nodes-vapor/admin-panel-nodes-sso.git", .upToNextMinor(from: "0.6.0")),
targets: [
    .target(
        name: "App",
        dependencies: [
            ...
            "AdminPanelNodesSSO"
        ]
    ),
    ...
]

Install resources

Copy the sso-button.leaf file from Resources/Views/AdminPanel/Login/ and the nodes.png from Public/images/ from this repo into your project into the same directories. You can download this repo as a zip and then move the files into the mentioned directories. Remember to check that you're not overwriting any files in your project.

🚀 Getting started

import AdminPanelNodesSSO

Add the Provider

try addProvider(AdminPanelNodesSSO.Provider.self)

Embed the Button

Within index.leaf in your Resources/Views/AdminPanel/Login/ insert right after the opening <body> tag:

#embed("AdminPanel/Login/sso-button")

🔧 Configurations

Make sure configs are added to adminpanel-sso-nodes.json:

| Key | Example value | Required | Description | | -------------- | ------------------------------------- | -------- | ---------------------------------------- | | redirectUrl | http://provider.com/sso/my-web-site | Yes | The url used for opening up the SSO login. | | salt | som3Rand0mS4lt | Yes | The salt to use for the hasher. | | loginPath | /admin/sso/login | No | The project path to start the SSO flow. | | callbackPath | /admin/sso/callback | No | The project path after user has logged in using SSO. |

🏆 Credits

This package is developed and maintained by the Vapor team at Nodes. The package owner for this project is Steffen.

📄 License

This package is open-sourced software licensed under the MIT license

Github

link
Stars: 4
Help us keep the lights on

Used By

Total: 1

Releases

0.7.0 - Apr 24, 2018

Changed

  • upgrade to AdminPanelProvider 0.7.0 to support custom user types while keeping the old syntax working.

Example of using your own custom user (e.g. Person):

try addProvider(AdminPanelNodesSSO.CustomUserProvider<Person>.self)

Make sure to conform your user to SSOUserType.

0.6.0 - Apr 24, 2018

Changed

  • Update to Admin Panel 0.6.0 + Swift 4.1

0.5.2 - Apr 16, 2018

Fixed

  • SSO users are now correctly being persisted when logging in.

0.5.1 - Mar 7, 2018

Fixed

  • SSO is now also skipped when running on "localhost" - before it would only happen for "0.0.0.0" or "127.0.0.1"

0.5.0 - Mar 6, 2018

Changed

  • depends on Admin Panel Provider 0.5.x