#java#keycloak#oidc#saml
Keycloak is an open-source tool that helps you add secure login and access control to your apps easily. It lets users sign in once and access many applications without logging in repeatedly (single sign-on). You don’t have to manage user data or authentication yourself because Keycloak handles it all securely using industry standards like OAuth 2.0 and SAML. It supports strong security features like two-factor authentication and works well with many identity providers. This saves you time and money by avoiding custom solutions and simplifies managing user access across your services. You can run it on your own servers or in the cloud, and it’s easy to set up and customize[1][2][3][4][5].
https://github.com/keycloak/keycloak
🚀 Вышел стабильный JavaScript движок от Google для Android
Новая стабильная библиотека Jetpack JavaScript Engine позволит разработчикам выполнять JS код в изолированной и ограниченной среде.
class MainActivity : ComponentActivity() {
// Теперь nullable, без lateinit
private var jsSandbox: JavaScriptSandbox? = null
private var jsIsolate: JavaScriptIsolate? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!JavaScriptSandbox.isSupported()) {
Log.e("JS", "JavaScriptSandbox не поддерживается")
return
}
lifecycleScope.launch {
// Создаём и сохраняем в nullable-поле
jsSandbox = JavaScriptSandbox
.createConnectedInstanceAsync(applicationContext)
.await()
jsIsolate = jsSandbox?.createIsolate()
// При выполнении гарантируем, что jsIsolate != null
val result: String = jsIsolate
?.evaluateJavaScriptAsync(JS_SCRIPT_SCRING)
?.await()
?: "Ошибка: isolate не инициализирован"
Log.d("JS", "Результат выполнения: $result")
}
}
override fun onDestroy() {
super.onDestroy()
// Закрываем только если не null
jsIsolate?.close()
jsSandbox?.close()
}
}
#jetpack#js