Generic

data class Generic(val name: String, val authEndpoint: String, val tokenEndpoint: String, val userInfoEndpoint: String?, val idPath: List<String>, val usernamePath: List<String>, val emailPath: List<String>, val defaultScopes: List<String> = listOf("openid", "profile", "email")) : OAuthProvider

A generic OAuth2 provider that can be configured at runtime.

Constructors

Link copied to clipboard
constructor(name: String, authEndpoint: String, tokenEndpoint: String, userInfoEndpoint: String?, idPath: List<String>, usernamePath: List<String>, emailPath: List<String>, defaultScopes: List<String> = listOf("openid", "profile", "email"))

Properties

Link copied to clipboard
open override val authEndpoint: String
Link copied to clipboard
open override val defaultScopes: List<String>
Link copied to clipboard
open override val emailPath: List<String>

The path to the user's email in the user info JSON.

Link copied to clipboard
open override val idPath: List<String>

The path to the user's unique ID in the user info JSON.

Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val tokenEndpoint: String
Link copied to clipboard
open override val userInfoEndpoint: String?
Link copied to clipboard
open override val usernamePath: List<String>

The path to the user's username in the user info JSON.

Functions

Link copied to clipboard

Parses the user info JSON from the provider and returns a triple of (providerUserId, username, email).