Skip to content

Instantly share code, notes, and snippets.

View reflexdemon's full-sized avatar

Venkateswara Venkatraman Prasanna reflexdemon

View GitHub Profile
@reflexdemon
reflexdemon / angularjs-providers-explained.md
Last active January 19, 2017 12:52 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@reflexdemon
reflexdemon / generate_uaa_keypair.sh
Created February 19, 2019 12:33 — forked from bijukunjummen/generate_uaa_keypair.sh
Generate a Signing Key and Verification Key for Cloud Foundry UAA
#!/bin/bash
openssl genrsa -out privkey.pem 2048
openssl rsa -pubout -in privkey.pem -out pubkey.pem
SIGNING_KEY=$(cat privkey.pem)
VERIFICATION_KEY=$(cat pubkey.pem)
JWT_SIGNING_KEYS=$(cat <<EOF
jwt:
token:
package app.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.ProviderManager;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;