Releases: techfromsage/persona-node-client
Releases · techfromsage/persona-node-client
Ignore cache errors and call Persona
4.1.6 Merge pull request #42 from talis/plat_1729_ignore_cache_errors_and_c…
Refactor token validation and add tests
Merge pull request #41 from talis/plat_1729_handle_cache_errors 90% Plat 1729 refactor for testing
Remove Grunt
List Scopes
Provide the ability to list a set of scopes related to a JWT token by either retrieving them from the token or Persona.
Bump redis cache library version
Merge pull request #37 from talis/PLAT_1938_BumpRedisLibrary_from_master PLAT-1938 Bump redis cache library
Support su@provider scopes
su@provider
scope is now supported within the client.
Removing persona_oauth_route configuration
It is no longer possible to configure persona_oauth_route.
Migration to Version Three Routes
Major bump in the version to signify that the client now uses Persona /3
routes
Validate Token Against Multiple Scopes
When validating a token it is now possible to provide multiple scopes by passing a comma delimited string. If any of the scopes validate against the token the callback is called. The su
scope is also implicitly checked.
/**
* Check if a user is allowed to impersonate another, and logs it
*/
app.post('/some/route', function(req,res) {
req.param.scope = "some_scope,other_scope";
req.personaClient.validateHTTPBearerToken(req,res, function(){
// you're good, do stuff
});
});
or
personaClient.validateToken({token: token, scope: ['scope1', 'scope2']}, function(err, status, token) {
if (!err && status) {
// you're good, do stuff
}
});
Unique Cache Keys Per Persona Host
The caching keys should be unique per persona environment to avoid any conflicts.