@nebular/security
Advanced tools
Changelog
3.0.1 (2018-12-13)
<a name="3.0.0"></a>
Changelog
3.0.0 (2018-11-15)
<a name="2.0.2"></a>
Changelog
2.0.2 (2018-10-23)
<a name="2.0.1"></a>
Changelog
2.0.0 (2018-10-02)
Nebular 2.0 is stable now! After 10 release candidates and a year of work we finally made it with a great help of Nebular community and we cannot be more grateful for all of your contributions! :tada:
isAuthenticatedOrRefresh
to not refresh token with no value (#708) (b29418f)Invalid value for $grid-breakpoints..
(#736) (23e7804)angular.json
(#701) (3211c54)isAuthenticatedOrRefresh
method, update NbAuthJWTInterceptor
to refresh the token (#649) (c8e8964)This release has introduced a number of changes which may required some manual update steps, depending on your setup:
@nebular/bootstrap
package. To do that:npm i @nebular/bootstrap
styles.scss
@import '~@nebular/bootstrap/styles/globals';
// ...
@include nb-install() {
// ...
@include nb-bootstrap-global();
}
~@nebular/theme/styles/global/bootstrap/breakpoints
in your code, replace it with ~@nebular/theme/styles/global/breakpoints
~@nebular/theme/styles/global/bootstrap/*.scss
somewhere in your code, replace it with ~@nebular/bootstrap/styles/*.scss
npm i @angular/cdk
Here's a list of other possibly breaking changes that you may need to take into account:
menu: NbMenuComponent
and NbContextMenuDirective
now fire itemClick even if item with routerLink
was clicked.
menu: The NbMenuService
not reply the last click event. To update: if you use the knowledge that the last click event is replied you can wrap onItemClick
stream in the custom stream based on ReplaySubject
.
theme: angular2-toaster styles were removed from Nebular.
Instead, we suggest using our new NbToastrService
. To update: add NbToastrModule
into imports of your app.module
.
Inject NbToastrService
into the required component.
call NbToastrService.show(...)
to render toasts.
For more information check toastr documentation.
theme: All bootstrap override styles were moved from the @nebular/theme package to the new @nebular/bootstrap package. If you don't need bootstrap support you can simply no use this package. @nebular/theme package introduced a dependency of normalize.css. To update:
npm i @nebular/bootstrap
styles.scss
@import '~@nebular/bootstrap/styles/globals';
// ...
@include nb-install() {
// ...
@include nb-bootstrap-global();
}
theme: appendToLayoutTop
and clearLayoutTop
methods was removed from NbThemeService
. Instead of this methods, you have to use NbOverlayService
. It's the extension of @angular/cdk overlays, so, check documentation first of all. Basic usage of overlays may look like this:
constructor(protected overlay: NbOverlayService) {
}
const overlayRef = overlay.create();
const overlayComponentPortal = new ComponentPortal(MyOverlayComponent);
overlayRef.attach(overlayComponentPortal);
tabset: Possibly a breaking change since tabs won't be bold in hover state.
auth: According to RFC6749 section 4.3.2, the OAuth2 token request body with grant-type='password' must provide username
to the auth server and not email
.
auth: NbAuthJWTInterceptor
now always tries to refresh the token.
Urls for token sending can be filtered using a filter function:
{ provide: NB_AUTH_TOKEN_INTERCEPTOR_FILTER, useValue: (req) => filter(req)},
failWhenNoToken
has been removed from password strategy as it was still not released and becoming redundant<a name="2.0.0-rc.10"></a>
Changelog
2.0.0-rc.10 (2018-08-08)
NbAuthOAuth2JWTToken
subheader
header option, and other cool stuff!getClassByName
errors (#548) (ac41765), closes #528;
(#475) (c67ec11)password
to OAuth2 Strategy (d8a66a8)fullWidth
mode (#591) (13014d4)subheader
mode when header is placed on a side of sidebar (#555) (4715b04), closes #554nbButton
(#559) (657147b)nbAuthCreateToken
(token.ts) function now takes a third parameter, which is the ownerStrategyName
.
Since nbAuthCreateToken
is a part of public API this could potentially introduce a breaking change..btn-tn
renamed to btn-xs
<a name="2.0.0-rc.9"></a>
Changelog
2.0.0-rc.9 (2018-06-19) :rocket:
setup
method, multiple tokens (3428ec3)Multiple breaking changes introduced to auth module to improve code readability, follow better naming conventions and for better extensibility in future releases. More details and update steps: https://github.com/akveo/nebular/blob/master/src/framework/auth/UPGRADE.md#200-rc8-200-rc9
<a name="2.0.0-rc.8"></a>
Changelog
2.0.0-rc.7 (2018-04-21)
link
property of menu-item.<a name="2.0.0-rc.6"></a>
Changelog
2.0.0-rc.6 (2018-02-22)
popover
component (7dbefd6)lazyLoad
property to nb-tab
so that it loads content before it is actually shown (#227) (270995d), closes #144<nb-user [menu]="items"></nb-user>
and use NbContextMenuDirective:
<nb-user [nbContextMenu]="items"></nb-user>
NB_AUTH_TOKEN_WRAPPER_CLASS
renamed to NB_AUTH_TOKEN_CLASS
and you should use useValue
instead of useClass
when providing a token:
{ provide: NB_AUTH_TOKEN_WRAPPER_TOKEN, useClass: NbAuthJWTToken },
to { provide: NB_AUTH_TOKEN_CLASS, useValue: NbAuthJWTToken },
setValue
method removed from NbAuthSimpleToken
, NbAuthJWTToken
, tokens only accept read-only value when created through constructor now.
Token Storage moved out from NbTokenService
into a separate NbTokenStorage
.
If you need to change the storage behavior or provide your own - just extend your class from basic NbTokenStorage
or NbTokenLocalStorage
and provide in your app.module
:
{ provide: NbTokenStorage, useClass: NbTokenCustomStorage },
<a name="2.0.0-rc.5"></a>