-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added auth0 authentication * added secured parameter for Auth0 * code correction
- Loading branch information
1 parent
6df13b7
commit 3c88794
Showing
20 changed files
with
604 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
auth/src/main/java/com/alfresco/auth/data/AppConfigDetails.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.alfresco.auth.data | ||
|
||
import kotlinx.serialization.Serializable | ||
import kotlinx.serialization.SerializationException | ||
import kotlinx.serialization.json.Json | ||
|
||
@Serializable | ||
data class OAuth2Data( | ||
val host: String, | ||
val clientId: String, | ||
val secret: String, | ||
val scope: String, | ||
val implicitFlow: Boolean, | ||
val codeFlow: Boolean, | ||
val silentLogin: Boolean, | ||
val publicUrls: List<String>, | ||
val redirectSilentIframeUri: String, | ||
val redirectUri: String, | ||
val logoutUrl: String, | ||
val logoutParameters: List<String>, | ||
val redirectUriLogout: String, | ||
val audience: String, | ||
val skipIssuerCheck: Boolean, | ||
val strictDiscoveryDocumentValidation: Boolean | ||
) | ||
|
||
@Serializable | ||
internal data class AppConfigDetails( | ||
val oauth2: OAuth2Data | ||
) { | ||
companion object { | ||
private val json = Json { ignoreUnknownKeys = true } | ||
|
||
fun jsonDeserialize(str: String): AppConfigDetails? { | ||
return try { | ||
json.decodeFromString(serializer(), str) | ||
} catch (ex: SerializationException) { | ||
null | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.