This file contains hidden or 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 Keycloak from 'keycloak-js'; | |
| let initOptions = { | |
| url: 'http://localhost:8080/', | |
| realm: 'master', | |
| clientId: 'react-client', | |
| onLoad: 'check-sso', // check-sso | login-required | |
| KeycloakResponseType: 'code', | |
| } |
This file contains hidden or 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
| docker run --rm --name keycloak_auto_build -p 8080:8080 \ | |
| -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin \ | |
| quay.io/keycloak/keycloak:latest \ | |
| start \ | |
| --auto-build \ | |
| --db=dev-mem --hostname localhost:8080 --http-enabled true \ | |
| --hostname-strict-https false |
This file contains hidden or 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
| docker run --name keycloak_auto_build -p 8080:8080 \ | |
| -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=change_me \ | |
| quay.io/keycloak/keycloak:latest \ | |
| start \ | |
| --auto-build --hostname=hexadefence.com \ | |
| --db=postgres --features=token-exchange \ | |
| --db-url=<JDBC-URL> \ | |
| --db-username=<DB-USER> --db-password=<DB-PASSWORD> \ | |
| --https-key-store-file=<file> --https-key-store-password=<password> |
This file contains hidden or 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
| docker run --name keycloak_test -p 8080:8080 \ | |
| -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=password \ | |
| quay.io/keycloak/keycloak:latest \ | |
| start-dev |
This file contains hidden or 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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: keycloak-deployment | |
| namespace: keycloak | |
| spec: | |
| replicas: 2 | |
| selector: | |
| matchLabels: | |
| app: keycloak-deployment |
This file contains hidden or 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
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: headless-kc-service | |
| namespace: keycloak | |
| spec: | |
| clusterIP: None | |
| selector: | |
| app: keycloak-deployment |
This file contains hidden or 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
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: keycloak-service | |
| namespace: keycloak | |
| spec: | |
| ports: | |
| - name: httpPort | |
| port: 8080 | |
| targetPort: 8080 |
This file contains hidden or 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
| public class MyAdvices { | |
| @Advice.OnMethodEnter(suppress = Throwable.class) | |
| static long enter(@Advice.This Object thisObject, | |
| @Advice.Origin String origin, | |
| @Advice.Origin("#t #m") String detaildOrigin, | |
| @Advice.AllArguments Object[] ary, | |
| @Advice.FieldValue(value = "name", readOnly = false) String nameField){ | |
| System.out.println("Inside enter method . . . "); | |
This file contains hidden or 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
| public class ByteBuddyExampleMain { | |
| public static void main(String[] args) throws Exception { | |
| Class<?> type = new ByteBuddy() | |
| .redefine(Robot.class) | |
| .visit(Advice.to(MyAdvices.class).on(ElementMatchers.isMethod())) | |
| .make() | |
| .load(ClassLoadingStrategy.BOOTSTRAP_LOADER, ClassLoadingStrategy.Default.WRAPPER) | |
| .getLoaded(); |
This file contains hidden or 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
| public class Robot { | |
| private String name = "Casper"; | |
| public String greetUser(String name ){ | |
| System.out.println("Inside greetUser method . . . "); | |
| return "Hello " + name + "! I am " + this.name; | |
| } | |
| } |
NewerOlder