Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit 8f6d3ca

Browse files
Merge pull request #76 from nodes-vapor/feature/add-sso-convenience
Init using SSO and config
2 parents 7e94101 + 6960df8 commit 8f6d3ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/AdminPanel/Support/Provider.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ public final class Provider: Vapor.Provider {
6868
adminPanelConfig.ssoProvider = ssoProvider
6969
}
7070

71+
public convenience init(config: Config, ssoProvider: SSOProtocol? = nil) throws {
72+
try self.init(config: config)
73+
adminPanelConfig.ssoProvider = ssoProvider
74+
}
75+
7176
public func beforeRun(_ droplet: Droplet) throws {
7277
if (adminPanelConfig.loadRoutes) {
7378
let unsecured = droplet.grouped(Middlewares.unsecured)

0 commit comments

Comments
 (0)