Skip to content

Commit

Permalink
chore: merge angular6-keycloak4 to master.
Browse files Browse the repository at this point in the history
- This commit includes the work done in milestone v.4.0.0.
- Milestone v.4.0.0 includes the following issues:
#47, #50, #51, #52, #56, #58 and #61
  • Loading branch information
mauriciovigolo committed May 21, 2018
2 parents f26fb9c + 468afe4 commit 08c9081
Show file tree
Hide file tree
Showing 124 changed files with 42,238 additions and 13,874 deletions.
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!--
Please fill out the following information. Thanks!
-->

### Bug Report or Feature Request (mark with an `x`)

```
- [ ] bug report -> please search for issues before submitting
- [ ] feature request
```

### Versions.

<!--
keycloak-angular, angular and keycloak versions.
-->

### Repro steps.

<!--
Simple steps to reproduce this bug.
Please include: commands run, packages added, related code changes.
A link to a sample repo would help too.
-->

### The log given by the failure.

<!-- Normally this include a stack trace and some more information. -->

### Desired functionality.

<!--
What would like to see implemented?
What is the usecase?
-->
43 changes: 43 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## PR Checklist

Please check if your PR fulfills the following requirements:

* [ ] The commit message follows our [guidelines](https://github.com/mauriciovigolo/keycloak-angular/blob/master/docs/CONTRIBUTING.md)
* [ ] Tests for the changes have been added (for bug fixes / features)
* [ ] Docs have been added / updated (for bug fixes / features)

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

```
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:
```

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->

Issue Number: N/A

## What is the new behavior?

## Does this PR introduce a breaking change?

```
[ ] Yes
[ ] No
```

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->

## Other information
25 changes: 25 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 180
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 30
# Issues with these labels will never be considered stale
exemptLabels:w
- planning
- committed
- in-progress
- pinned
- security
- critical
- major
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been marked stale because it has not seen activity within
three months. If you believe this to be in error, please use the
This issue will be closed within 15 days of being stale.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue has been closed due to continued inactivity. Thank you for your understanding.
If you believe this to be in error, please contact one of the contributors
of the project.
46 changes: 38 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
documentation
node_modules
build
dist
.vscode
coverage

*.log
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"editor.formatOnPaste": true,
"editor.tabSize": 2,
"prettier.singleQuote": true,
"editor.formatOnSave": true
}
19 changes: 0 additions & 19 deletions LICENSE

This file was deleted.

32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Keycloak Angular

[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Slack](https://slackin-iijwrzzihr.now.sh/badge.svg)](https://slackin-iijwrzzihr.now.sh)
[![npm version](https://badge.fury.io/js/keycloak-angular.svg)](https://badge.fury.io/js/keycloak-angular)
[![Build Status](https://travis-ci.org/mauriciovigolo/keycloak-angular.svg?branch=master)](https://travis-ci.org/mauriciovigolo/keycloak-angular)
[![Known Vulnerabilities](https://snyk.io/test/github/mauriciovigolo/keycloak-angular/badge.svg)](https://snyk.io/test/github/mauriciovigolo/keycloak-angular)
[![npm version](https://badge.fury.io/js/keycloak-angular.svg)](https://badge.fury.io/js/keycloak-angular)
![npm](https://img.shields.io/npm/dm/keycloak-angular.svg)
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors)
[![Slack](https://slackin-iijwrzzihr.now.sh/badge.svg)](https://slackin-iijwrzzihr.now.sh)
[![Dependencies](https://david-dm.org/mauriciovigolo/keycloak-angular/status.svg)](https://david-dm.org/mauriciovigolo/keycloak-angular)
[![DepDependencies](https://david-dm.org/mauriciovigolo/keycloak-angular/dev-status.svg)](https://david-dm.org/mauriciovigolo/keycloak-angular?type=dev)

Expand Down Expand Up @@ -35,26 +37,42 @@ This library helps you to use [keycloak-js](https://github.com/keycloak/keycloak
Angular applications.
* Generic **AuthGuard implementation**, so you can customize your own AuthGuard logic inheriting the authentication logic and the roles load.
* A **HttpClient interceptor** that adds the authorization header to all HttpClient requests.
It is also possible to exclude routes from having the authorization header.
It is also possible to disable this interceptor or exclude routes from having the authorization header.
* This documentation also assists you to configure the keycloak in the Angular applications and with
the client setup in the admin console of your keycloak installation.

## Install

**Warning**: This library will work only with versions higher or equal than 4.3.0 of Angular. The reason for this is that we are using Interceptor from `@angular/common/http` package.
### Choosing the appropriate version of keycloak-angular

This library depends on angular and keycloak versions so as it might exist breaking changes in some of them there are
different build versions supporting these combinations, so be aware to choose the correct version for your project.

| keycloak-angular | Angular | Keycloak | SSO-RH |
| :--------------: | :-----: | :------: | :----: |
| 1.4.x | 4 and 5 | 3 | 7 |
| 2.x.x | 4 and 5 | 4 | - |
| 3.x.x | 6 | 3 | 7 |
| 4.x.x | 6 | 4 | - |

**Warning**: This library will work only with versions higher or equal than 4.3.0 of Angular. The reason for this is that keycloak-angular uses the Interceptor from `@angular/common/http` package and this feature was available from this version on.

### Steps to install using NPM or YARN

> Please, again, be aware to choose the correct version, as stated above. Installing this package without a version will make it compatible with the **latest** angular and keycloak versions.
In your angular application directory:

With npm:

```sh
npm install --save keycloak-angular
npm install --save keycloak-angular@<choosen-version-from-table-above>
```

With yarn:

```sh
yarn add keycloak-angular
yarn add keycloak-angular@<choosen-version-from-table-above>
```

## Setup
Expand Down
46 changes: 46 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"keycloak-angular": {
"root": "projects/keycloak-angular",
"sourceRoot": "projects/keycloak-angular/src",
"projectType": "library",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/keycloak-angular/tsconfig.lib.json",
"project": "projects/keycloak-angular/ng-package.json"
},
"configurations": {
"production": {
"project": "projects/keycloak-angular/ng-package.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/keycloak-angular/src/test.ts",
"tsConfig": "projects/keycloak-angular/tsconfig.spec.json",
"karmaConfig": "projects/keycloak-angular/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/keycloak-angular/tsconfig.lib.json",
"projects/keycloak-angular/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"defaultProject": "keycloak-angular"
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ The project needs a better documentation, including the API documentation, struc
## <a name="prb"></a> Proposed By

* Name: Mauricio Gemelli Vigolo
* Created in: 04/09/2018
* Created in: 2018-04-09
* Github user: [mauriciovigolo](https://github.com/mauriciovigolo)

### <a name="his"></a> History

| Date | User | Details |
| :--------: | :-------------------------------------------------: | -------------------------------- |
| 04/09/2018 | [mauriciovigolo](https://github.com/mauriciovigolo) | Initial version of this document |
| 2018-04-09 | [mauriciovigolo](https://github.com/mauriciovigolo) | Initial version of this document |

## <a name="rta"></a> Reason to add

Expand Down
34 changes: 34 additions & 0 deletions docs/project/proposals/request-for-change/examples_change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Proposal: Examples changes

The current example - keycloak-heroes needs to be updated to the newest angular, keycloak and keycloak-angular versions. A new example will be created, showing how to handle the keycloak events in an angular application.

---

## <a name="toc"></a> Table of Contents

* [Proposed By](#prb)
* [History](#his)
* [Reason to add](#rta)
* [Implementation Details](#imd)

---

## <a name="prb"></a> Proposed By

* Name: Mauricio Gemelli Vigolo
* Date: 2018-05-08
* Github user: [mauriciovigolo](https://github.com/mauriciovigolo)

### <a name="his"></a> History

| Date | User | Details |
| :--------: | :-------------------------------------------------: | -------------------------------- |
| 2018-05-08 | [mauriciovigolo](https://github.com/mauriciovigolo) | Initial version of this document |

## <a name="rta"></a> Reason to add

TBD: Reason to add

## <a name="imd"></a> Implementation Details

TBD: Details about the implementation

This file was deleted.

0 comments on commit 08c9081

Please sign in to comment.