Skip to content

Instantly share code, notes, and snippets.

@edewit
edewit / talk.md
Created December 4, 2014 08:06
Oauth2 talk

OAuth2 for native apps

Do you want to build a cool iOS/Android app to share your photos on Twitter, Facebook or Google+? If so, you will need to authenticate through OAuth2. Instead of using their own authentication schemes, most providers choose to implement OAuth2, the latest revision of the OAuth protocol. It gives users a secure way to talk to their services, but more importantly, allows users to safely authorise access to their data from third-party services without giving them their credentials.

If you think security topic is hard to tackle, join me in this live coding session. We'll delve deep into OAuth2 protocol and see the challenges to overcome from a native app perspective: embedded web view vs external browser, URL schema for callback, local storage for tokens, refresh access tokens transparently...

After this session, OAuth2 will have no secret to you!

How to build cross platform applications with Cordova

Mobile devices are increasingly important as a platform. The number of different devices on the market increases every day. This posses a challenge, how do we support all of them. Every new device comes with it's own paradigms and programming language. Wouldn't it be great if we could create one application that could support all platforms. With Cordova and AeroGear you can.

But that is not all a mobile application is more then just the client you'll need a flexible backend, LiveOak is backend-as-a-service stack that simplifies development for mobile.

Finally support for Push notifications accros platforms, reaching out to the users of your apps for marketing or buisness rules.

The mobile team at jboss has some more things that we'll be working on I'll give an overview of what is in the pipeline

///usr/bin/env jbang "$0" "$@" ; exit $?
//REPOS mavenCentral,sponge=https://repo.spongepowered.org/maven,jitpack=https://jitpack.io
//DEPS com.github.Minestom:Minestom:master-SNAPSHOT
import static java.lang.System.*;
import net.minestom.server.MinecraftServer;
public class server {
@edewit
edewit / script.md
Last active May 21, 2021 12:09
quick keycloak-nodejs-script

Example of how to admin keycloak

nodejs should be installed

Create a folder and node project:

mkdir keycloak-admin
cd keycloak-admin
npm init -y
const KcAdminClient = require('keycloak-admin').default;
const kcAdminClient = new KcAdminClient({
baseUrl: 'http://localhost:8180/auth',
realmName: 'master',
});
(async () => {
await kcAdminClient.auth({
username: 'admin',
<other>
<description>@emotion/memoize</description>
<locations>
<file>/node_modules/@emotion/memoize/dist/memoize.esm.js</file>
</locations>
<licenses>
<license>
<name>MIT</name>
<url>https://raw.githubusercontent.com/emotion-js/emotion/tree/master/next-packages/memoize/master/LICENSE</url>
</license>
/node_modules/react-dom/source.production.js
/node_modules/popper.js/dist/esm/popper.js
/node_modules/tippy.js/dist/tippy.chunk.esm.js
/node_modules/@patternfly/react-core/dist/esm/components/Select/Select.js
/node_modules/react-dropzone/dist/es/index.js
/node_modules/@patternfly/react-styles/css/layouts/Flex/flex.js
/node_modules/prop-types/factoryWithTypeCheckers.js
/node_modules/@patternfly/react-core/dist/esm/components/Wizard/Wizard.js
/node_modules/@emotion/stylis/dist/stylis.esm.js
/node_modules/create-emotion/dist/index.esm.js
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx
index 3b5f18141d..b45c5bb751 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx
+++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx
@@ -64,7 +64,7 @@ export class ResourcesTable extends AbstractResourcesTable<CollapsibleResourcesT
};
private fetchPermissions(resource: Resource, row: number): void {
- AccountService.doGet('resources/' + resource._id + '/permissions')
+ AccountService.doGet(`/resources/${resource._id}/permissions`)
import React, { useState, useEffect } from 'react';
export default function DataLoader(props) {
const [data, setData] = useState(undefined);
const [error, setError] = useState();
useEffect(() => {
setData(undefined);
const loadData = async () => {
try {
const result = await props.loader();
var bla = [
{
"additionalProperties": {},
"apiVersion": "apps.openshift.io/v1",
"kind": "DeploymentConfig",
"metadata": {
"additionalProperties": {},
"annotations": {
"template.alpha.openshift.io/wait-for-ready": "true"
},