const session = require("express-session");
const Keycloak = require("keycloak-connect");
const express = require("express");
const app = express();
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
services: | |
https-portal: | |
image: steveltn/https-portal:1 | |
ports: | |
- 80:80 | |
- 443:443 | |
restart: always | |
networks: | |
- front-tier | |
environment: |
Dependancies build.gradle(Module: app)
implementation ('org.jboss.aerogear:aerogear-android-authz:2.0.0') {
exclude module : 'compatibility-v4'
transitive = true
}
Keycloak is an open source Identity and Access Management solution aimed at modern applications and services. It makes it easy to secure applications and services with little to no code. It's open source and free to use
- When you don't know how to implement complex role based user authentication/ authorization mechanism to your app.
- Accelerated development time? maybe you'll have great business logic to focus on.
- Setup and deploy KeyCloak Server. ( In 5 Mins ?😎😎 )
- Setup Realms and Clients.
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
private static final String CHANNEL_ID = "com.apps.testnotifications" ; | |
private void createNotificationChannel() { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | |
CharSequence name = getString(R.string.app_name); | |
String description = getString(R.string.app_name); | |
int importance = NotificationManager.IMPORTANCE_DEFAULT; | |
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance); | |
channel.setDescription(description); |
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
import android.os.Environment; | |
import org.junit.Test; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.security.InvalidAlgorithmParameterException; | |
import java.security.InvalidKeyException; | |
import java.security.Key; | |
import java.security.NoSuchAlgorithmException; |
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
import java.security.KeyFactory; | |
import java.security.PrivateKey; | |
import java.security.interfaces.RSAPrivateKey; | |
import java.security.interfaces.RSAPublicKey; | |
import java.security.spec.PKCS8EncodedKeySpec; | |
import java.security.spec.X509EncodedKeySpec; | |
try { | |
String privateKeyContent = sharedPreferences.getString("SAMPLE_KEY_PRI",null); // load private key here |
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
data class Repo( | |
val `private`: Boolean, | |
val archive_url: String, | |
val archived: Boolean, | |
val assignees_url: String, | |
val blobs_url: String, | |
val branches_url: String, | |
val clone_url: String, | |
val collaborators_url: String, | |
val comments_url: String, |
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
var app = angular.module('app',[]); | |
app.controller('homeCtrl', function($scope){ | |
var DWObject; | |
$scope.initiate = function () { | |
Dynamsoft.WebTwainEnv.Load(); | |
} | |
$scope.AcquireImage = function(){ | |
Dynamsoft.WebTwainEnv.RegisterEvent('OnWebTwainReady', $scope.Dynamsoft_OnReady()); |