Releases: ferrerojosh/nest-keycloak-connect
Releases · ferrerojosh/nest-keycloak-connect
1.6.1
Minor release.
Changes:
- Add token validation method (#40, #62)
- Add policy enforcement mode (enforcing, permissive)
- Rework module registration (#63)
With this, it is now possible to register the module this way:
Method 1 (keycloak json path + library options)
KeycloakConnectModule.register(`./keycloak.json`, {
cookieKey: 'KEYCLOAK_JWT',
logLevels: ['verbose'],
useNestLogger: false,
policyEnforcement: PolicyEnforcementMode.ENFORCING,
tokenValidation: TokenValidation.NONE,
}),
Method 2 (keycloak json path only)
KeycloakConnectModule.register(`./keycloak.json`)
Method 3 (the usual method, merging both keycloak config and library options)
KeycloakConnectModule.register({
authServerUrl: 'http://localhost:8080/auth',
realm: 'nest-example',
clientId: 'nest-api',
secret: '05c1ff5e-f9ba-4622-98e3-c4c9d280546e',
// optional if you want to retrieve JWT from cookie
cookieKey: 'KEYCLOAK_JWT',
logLevels: ['verbose'],
useNestLogger: false,
policyEnforcement: PolicyEnforcementMode.ENFORCING,
tokenValidation: TokenValidation.NONE,
})
1.6.0
A minor update release.
Breaking Changes:
@Roles
decorator parameters changed, now requires you to pass a parameter object, a quick snippet (#45, thanks @jalorenz):
// Client application roles
@Roles({ roles: ['admin', 'other'], mode: RoleMatchingMode.ALL })
// Realm roles, simply prefix it with realm:
@Roles({ roles: ['realm:admin', 'realm:other'], mode: RoleMatchingMode.ALL })
@Roles
decorator now defaults to match ANY roles given- Remove
@AllowAnyRole
decorator
Changes:
1.5.3
1.5.2
A minor release.
Changes:
- Fix loggerProvider not being provided (#47) @CodeOneTwo
@EnforcerOptions
decorator should now work at controller/route level
1.5.1
Hot fix for routes not marked as @Public
allowing non authenticated requests.
1.5.0
1.4.3
- Fix: Public decorator with skipAuth = false will allow empty jwt bearer
1.4.2
Small change.
Update Keycloak to v12.0
1.4.1
Quick hot fix.
Changes:
- Make
@nestjs/graphql
completely optional.
1.4.0
A minor release.
- GraphQL support
- Align keycloak options to js version (https://github.com/keycloak/keycloak-nodejs-connect/blob/master/middleware/auth-utils/config.js)
- Expose
KEYCLOAK_INSTANCE
andMETA
constants