Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

RAINCATCH-1190 - Extract security interface #97

Merged
merged 3 commits into from
Aug 25, 2017

Conversation

wtrocki
Copy link
Member

@wtrocki wtrocki commented Aug 24, 2017

No description provided.


// Use keycloak middleware & define applications logout route
app.use(keycloak.middleware({logout: '/logout'}));
export class KeycloakSecurity implements EndpointSecurity {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think that despite this being really simple we should have it as separate module.

// Create a session store
const memoryStore = new session.MemoryStore();
this.keycloak = new Keycloak({ store: memoryStore }, config.keycloakConfig);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also re-add the app.use(keycloak.middleware({logout: '/logout'})); to use keycloak middleware and define the logout route

* @param redirect - location to redirect after successful authentication
* @param loginError - location to redirect after failed authentication
*/
authenticate(redirect: string, loginError: string): express.Handler;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be possible to remove this from the interface if this only refers to passport?

@wtrocki
Copy link
Member Author

wtrocki commented Aug 24, 2017

@JameelB Really good point about dropping this method.
It looks like we using that in top level application anyway.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 79e194d on wtrocki:RAINCATCH-1190 into ** on feedhenry-raincatcher:master**.

1 similar comment
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 79e194d on wtrocki:RAINCATCH-1190 into ** on feedhenry-raincatcher:master**.

@wtrocki wtrocki merged commit d4bb22f into feedhenry-raincatcher:master Aug 25, 2017
@wtrocki wtrocki deleted the RAINCATCH-1190 branch August 25, 2017 09:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants