Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt Raible mraible

View GitHub Profile
View search.component.spec.ts
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SearchComponent } from './search.component';
import { MockSearchService } from '../shared/search/mocks/search.service.mock';
import { MockActivatedRoute } from '../shared/search/mocks/routes';
import { SearchService } from '../shared';
import { ActivatedRoute } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { RouterTestingModule } from '@angular/router/testing';
@mraible
mraible / 10m-2.16.0.html
Last active Mar 4, 2022
Add Authentication to Any Web Page in 10 Minutes
View 10m-2.16.0.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<title>Simple Web Page</title>
<style>
h1 {
margin: 2em 0;
View android.log
2019-04-14 14:23:21.362 9919-9962/com.okta.developer D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2019-04-14 14:23:21.540 9919-9994/com.okta.developer V/Capacitor/Plugin: To native (Cordova plugin): callbackId: SecureStorage1589709940, service: SecureStorage, action: init, actionArgs: ["SecretStore"]
2019-04-14 14:23:21.541 9919-9994/com.okta.developer E/SecureStorage: Device is not secure
2019-04-14 14:23:21.545 9919-9994/com.okta.developer V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 23778496, pluginId: Browser, methodName: open
2019-04-14 14:23:21.545 9919-9994/com.okta.developer V/Capacitor: callback: 23778496, pluginId: Browser, methodName: open, methodData: {"url":"https:\/\/dev-737523.oktapreview.com\/oauth2\/default\/v1\/authorize?redirect_uri=com.okta.developer%3A%2Fcallback&client_id=0oak8qpmhim2MmwF20h7&response_type=code&state=hfYUg5lbP5&scope=openid%20profile%20offline_access&code_challenge=K4jgoVyT7ckRpar6rZ2AfJ9hVY18b3H5IYX38JbMtsg&code_
@mraible
mraible / application.yml
Created Jan 10, 2019
Get an ID Token from Okta with Spring Boot
View application.yml
okta:
oauth2:
issuer: https://{yourOktaDomain}/oauth2/default
client-id: {clientId}
client-secret: {clientSecret}
@mraible
mraible / init.lua
Last active Jun 17, 2021
My Hammerspoon init.lua
View init.lua
units = {
right30 = { x = 0.70, y = 0.00, w = 0.30, h = 1.00 },
right70 = { x = 0.30, y = 0.00, w = 0.70, h = 1.00 },
left70 = { x = 0.00, y = 0.00, w = 0.70, h = 1.00 },
left30 = { x = 0.00, y = 0.00, w = 0.30, h = 1.00 },
top50 = { x = 0.00, y = 0.00, w = 1.00, h = 0.50 },
bot50 = { x = 0.00, y = 0.50, w = 1.00, h = 0.50 },
upright30 = { x = 0.70, y = 0.00, w = 0.30, h = 0.50 },
botright30 = { x = 0.70, y = 0.50, w = 0.30, h = 0.50 },
upleft70 = { x = 0.00, y = 0.00, w = 0.70, h = 0.50 },
@mraible
mraible / apps.jh
Last active Dec 16, 2021
Microservices with JHipster and Import JDL
View apps.jh
application {
config {
baseName gateway,
packageName com.okta.developer.gateway,
applicationType gateway,
authenticationType oauth2,
prodDatabaseType postgresql,
searchEngine elasticsearch,
serviceDiscoveryType eureka,
testFrameworks [protractor]
@mraible
mraible / server.log
Created Aug 20, 2018
Spring Boot 2.1.0.M1 and Spring Security 5.1.0.RC1 Resource Server w/o client secret
View server.log
2018-08-20 15:12:22.992 WARN 2203 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfiguration': Unsatisfied dependency expressed through method 'setContentNegotationStrategy' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.OAuth2ClientConfiguration$OAuth2ClientWebMvcSecurityConfiguration': Unsatisfied dependency expressed through method 'setClientRegistrationRepository'
@mraible
mraible / spring.log
Created Jul 18, 2018
Spring Security 5.1 Issuer Error
View spring.log
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfiguration': Unsatisfied dependency expressed through method 'setContentNegotationStrategy' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.OAuth2ClientConfiguration$OAuth2ClientWebMvcSecurityConfiguration': Unsatisfied dependency expressed through method 'setAuthorizedClientService' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authorizedClientService' defined in class path resource
@mraible
mraible / .yo-rc.json
Created May 19, 2018
JHipster Performance Numbers
View .yo-rc.json
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.okta.developer",
"nativeLanguage": "en"
},
"jhipsterVersion": "5.0.0-beta.1",
"baseName": "blog",
"packageName": "com.okta.developer",
"packageFolder": "com/okta/developer",