Site for everything
Projet de Programmation Objet - Licence 3 Informatique de l'Université Paul Sabatier
CLI tool for Angular
A magic mod for Minecraft based on nature and plant life.
Remember Twitch plays Pokémon? This time it's not Pokémon...
Curse Modpack Downloader
Web Fortress
alagane/docker-petals-cockpit 0
A Dockerfile for Petals Cockpit
startedactions/virtual-environments
started time in 5 hours
startedorganicmaps/organicmaps
started time in 7 hours
issue commentlinagora/esn-frontend-inbox
as a user I want to be connected every time
the link (https://wstutorial.com/am/obtain-jwt-from-keycloak.html) shows that the access_token + refresh_token are packed into the JWT token.
yes we are aware of what keycloak provides, but here its not the topic. one more time, we shouldnt use refresh token for SPA without rotating mechanism
comment created time in 17 hours
push eventlinagora/esn-frontend-inbox
commit sha 9f70c5d092b41f9be8f51432f7d2e7ccdc30413a
Use try_files until we rework the routing
commit sha 22a52caa472adb25fdba09d64e16f312543d03a1
Merge pull request #477 from linagora/tanandy-patch-1 Use try_files until we rework the routing
commit sha a4b15b293e438f183a3771a1bccfe9b4a2c1706c
Merge branch 'main' into inbox-453-fix-401-jwt-token
push time in a day
push eventlinagora/esn-frontend-inbox
commit sha 8283801c5c80bf266c9ac089288de661b8a6a675
#453 Fix 401 error
push time in a day
Pull request review commentlinagora/esn-frontend-inbox
angular.module('esn.inbox.libs') function _initializeJmapClient() { return $q.all([- generateJwtToken(),+ tokenAPI.getWebToken(true),
tokenAPI.getWebToken(),
we don't want a new token each time. we need to use the cached one
comment created time in a day
Pull request review commentlinagora/esn-frontend-inbox
angular.module('esn.inbox.libs') function _initializeJmapClient() { return $q.all([- generateJwtToken(),+ tokenAPI.getWebToken(true), inboxConfig('api'), inboxConfig('downloadUrl')- ]).then(function(data) {+ ]).then(function([{ data: jwt }, api, downloadUrl]) {
]).then(function([{ data: jwt }, apiUrl, downloadUrl]) {
comment created time in a day
Pull request review commentlinagora/esn-frontend-inbox
angular.module('esn.inbox.libs') function _initializeJmapClient() { return $q.all([- generateJwtToken(),+ tokenAPI.getWebToken(true), inboxConfig('api'), inboxConfig('downloadUrl')- ]).then(function(data) {+ ]).then(function([{ data: jwt }, api, downloadUrl]) { jmapClient = new jmapDraft.Client(dollarHttpTransport, dollarQPromiseProvider)- .withAPIUrl(data[1])- .withDownloadUrl(data[2])- .withAuthenticationToken('Bearer ' + data[0])+ .withAPIUrl(api)
.withAPIUrl(apiUrl)
comment created time in a day
Pull request review commentlinagora/esn-frontend-inbox
describe('The jmapClientProvider service', function() { }); it('should return a fulfilled promise if jwt generation succeed', function(done) {- angular.mock.module(function($provide) {- $provide.value('generateJwtToken', function() {- return $q.when('expected jwt');- });- }); config['linagora.esn.unifiedinbox.api'] = 'expected jmap api'; config['linagora.esn.unifiedinbox.downloadUrl'] = 'expected jmap downloadUrl';+ tokenAPIMock.getWebToken = () => $q.when({ data: 'jwt' }); injectServices.bind(this)(); - jmapClientProvider.get().then(function(client) {- expect(client).to.be.an.instanceof(jmapDraft.Client);- expect(client.authToken).to.equal('Bearer expected jwt');- expect(client.apiUrl).to.equal('expected jmap api');- expect(client.downloadUrl).to.equal('expected jmap downloadUrl');+ jmapClientProvider.get()+ .then(function(client) {+ expect(client).to.be.an.instanceof(jmapDraft.Client);+ expect(client.authToken).to.equal('Bearer jwt');+ expect(client.apiUrl).to.equal('expected jmap api');+ expect(client.downloadUrl).to.equal('expected jmap downloadUrl'); - done();- }, done.bind(null, 'should resolve'));+ done();
to match the indentation level, the done should be at the same level of the expect

comment created time in a day
Pull request review commentlinagora/esn-frontend-inbox
describe('The jmapClientProvider service', function() { }); it('should return a fulfilled promise if jwt generation succeed', function(done) {- angular.mock.module(function($provide) {- $provide.value('generateJwtToken', function() {- return $q.when('expected jwt');- });- }); config['linagora.esn.unifiedinbox.api'] = 'expected jmap api'; config['linagora.esn.unifiedinbox.downloadUrl'] = 'expected jmap downloadUrl';+ tokenAPIMock.getWebToken = () => $q.when({ data: 'jwt' }); injectServices.bind(this)(); - jmapClientProvider.get().then(function(client) {- expect(client).to.be.an.instanceof(jmapDraft.Client);- expect(client.authToken).to.equal('Bearer expected jwt');- expect(client.apiUrl).to.equal('expected jmap api');- expect(client.downloadUrl).to.equal('expected jmap downloadUrl');+ jmapClientProvider.get()+ .then(function(client) {+ expect(client).to.be.an.instanceof(jmapDraft.Client);+ expect(client.authToken).to.equal('Bearer jwt');+ expect(client.apiUrl).to.equal('expected jmap api');+ expect(client.downloadUrl).to.equal('expected jmap downloadUrl'); - done();- }, done.bind(null, 'should resolve'));+ done();
yes, no ?
comment created time in a day
Pull request review commentlinagora/esn-frontend-inbox
describe('The inboxMessageBodyHtml component', function() { var $compile, $rootScope, $timeout, newComposerService; var element; + const tokenAPIMock = {+ getNewToken: function() {+ return $q.when({ data: { token: '123' } });
this is a unit @tanandy
comment created time in a day
push eventlinagora/esn-frontend-inbox
commit sha 9f70c5d092b41f9be8f51432f7d2e7ccdc30413a
Use try_files until we rework the routing
commit sha 22a52caa472adb25fdba09d64e16f312543d03a1
Merge pull request #477 from linagora/tanandy-patch-1 Use try_files until we rework the routing
commit sha 0c1f3edd0c4205383fd5f5ee515f49cd15e1db6a
Merge branch 'main' into inbox-453-fix-401-jwt-token
push time in a day
push eventlinagora/esn-frontend-inbox
commit sha 600e89a6c407f9eebdced256bfacd4105e9f7309
#453 Fix 401 error
push time in a day
Pull request review commentlinagora/esn-frontend-inbox
describe('The inboxMessageBodyHtml component', function() { var $compile, $rootScope, $timeout, newComposerService; var element; + const tokenAPIMock = {+ getNewToken: function() {+ return $q.when({ data: { token: '123' } });
It doesn't matter the value here, just a token value
comment created time in a day
Pull request review commentlinagora/esn-frontend-inbox
describe('The jmapClientProvider service', function() { }); it('should return a fulfilled promise if jwt generation succeed', function(done) {- angular.mock.module(function($provide) {- $provide.value('generateJwtToken', function() {- return $q.when('expected jwt');- });- }); config['linagora.esn.unifiedinbox.api'] = 'expected jmap api'; config['linagora.esn.unifiedinbox.downloadUrl'] = 'expected jmap downloadUrl';+ tokenAPIMock.getWebToken = () => $q.when({ data: 'jwt' }); injectServices.bind(this)(); - jmapClientProvider.get().then(function(client) {- expect(client).to.be.an.instanceof(jmapDraft.Client);- expect(client.authToken).to.equal('Bearer expected jwt');- expect(client.apiUrl).to.equal('expected jmap api');- expect(client.downloadUrl).to.equal('expected jmap downloadUrl');+ jmapClientProvider.get()+ .then(function(client) {+ expect(client).to.be.an.instanceof(jmapDraft.Client);+ expect(client.authToken).to.equal('Bearer jwt');+ expect(client.apiUrl).to.equal('expected jmap api');+ expect(client.downloadUrl).to.equal('expected jmap downloadUrl'); - done();- }, done.bind(null, 'should resolve'));+ done();
do we have spaces here ?
comment created time in a day
Pull request review commentlinagora/esn-frontend-inbox
describe('The inboxMessageBodyHtml component', function() { var $compile, $rootScope, $timeout, newComposerService; var element; + const tokenAPIMock = {+ getNewToken: function() {+ return $q.when({ data: { token: '123' } });
what is 123 ?
comment created time in a day
push eventlinagora/esn-frontend-inbox
commit sha 9f70c5d092b41f9be8f51432f7d2e7ccdc30413a
Use try_files until we rework the routing
commit sha 22a52caa472adb25fdba09d64e16f312543d03a1
Merge pull request #477 from linagora/tanandy-patch-1 Use try_files until we rework the routing
commit sha 7f3e06444294e2ff70c0fffb0af9bb4e25475cd5
Merge branch 'main' into inbox-453-fix-401-jwt-token
push time in a day
PR opened linagora/esn-frontend-inbox
pr created time in a day
create barnchlinagora/esn-frontend-inbox
branch : inbox-453-fix-401-jwt-token
created branch time in a day
Pull request review commentlinagora/esn-frontend-common-libs
use current date in seconds instead of milliseconds while checking jwt exp claim expiration
angular.module('esn.authentication', ['esn.http']) if (!expirationTime) return promise || requestNewWebToken(); // check if we haven't reached the expiration time yet.- return expirationTime > Date.now() ? promise : requestNewWebToken();+ // jwt exp claim is a NumericDate value that is defined as the number of seconds (not milliseconds) since Epoch.+ return expirationTime > Date.now() / 1000 ? promise : requestNewWebToken();
this has nothing to do with OIDC i believe, client ( ie calendar SPA ) will request a jwt token from ESN to use it when making requests to services like Sabre and jmap.
comment created time in 2 days
Pull request review commentlinagora/esn-frontend-common-libs
use current date in seconds instead of milliseconds while checking jwt exp claim expiration
angular.module('esn.authentication', ['esn.http']) if (!expirationTime) return promise || requestNewWebToken(); // check if we haven't reached the expiration time yet.- return expirationTime > Date.now() ? promise : requestNewWebToken();+ // jwt exp claim is a NumericDate value that is defined as the number of seconds (not milliseconds) since Epoch.+ return expirationTime > Date.now() / 1000 ? promise : requestNewWebToken();
sure but how we can work if its not behind OIDC ?
comment created time in 2 days
PR opened linagora/esn-frontend-common-libs
pr created time in 2 days
startedSigNoz/signoz
started time in 3 days
push eventlinagora/esn-frontend-common-libs
commit sha 7a43c1d15706f77b8a62ce142160248ddab1c29c
#104: Prevent error looping when fallback src not found
commit sha ffdd13b42ca611d480f90761a879b0166348ba06
Merge pull request #220 from renaudboyer/fix-fallback-src-loop
push time in 3 days
PR merged linagora/esn-frontend-common-libs
Display one console warn instead of looping on trying to fetch fallback src

pr closed time in 3 days
issue commentlinagora/esn-frontend-inbox
as a user I want to be connected every time
the link (https://wstutorial.com/am/obtain-jwt-from-keycloak.html) shows that the access_token + refresh_token are packed into the JWT token.
comment created time in 3 days
issue commentlinagora/esn-frontend-inbox
as a user I want to be connected every time
Maybe thé refresh_token could be used to refresh the access_token in case it has expired
Sûre. Btw using refresh token for spa without rotating mecanism is a security issue.
Btw here it is mainly the jwt token that expires before. We need to Sync jwt and Access token
comment created time in 3 days
issue commentlinagora/esn-frontend-inbox
as a user I want to be connected every time
Maybe thé refresh_token could be used to refresh the access_token in case it has expired
comment created time in 3 days