allow attaching of custom data
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -204,7 +204,6 @@ describe ('auth handler', () => {
|
||||
.toEqual ({ error: 'invalid_client' });
|
||||
});
|
||||
|
||||
|
||||
it ('should process part token', async () => {
|
||||
const resp1 = await get ({ authorization: 'Basic part:bar' });
|
||||
expect (resp1.statusCode)
|
||||
|
@ -38,6 +38,10 @@ describe ('authority', () => {
|
||||
.toEqual ('access_token');
|
||||
expect (res.next_module)
|
||||
.toBeUndefined ();
|
||||
expect (res.id)
|
||||
.toEqual (token.id);
|
||||
expect (res.error)
|
||||
.toBeUndefined ();
|
||||
});
|
||||
|
||||
it ('should create a refresh token', () => {
|
||||
@ -53,6 +57,10 @@ describe ('authority', () => {
|
||||
.toEqual ('refresh_token');
|
||||
expect (res.next_module)
|
||||
.toBeUndefined ();
|
||||
expect (res.id)
|
||||
.toEqual (token.id);
|
||||
expect (res.error)
|
||||
.toBeUndefined ();
|
||||
});
|
||||
|
||||
it ('should create a part token', () => {
|
||||
@ -68,6 +76,10 @@ describe ('authority', () => {
|
||||
.toEqual ('part_token');
|
||||
expect (res.next_module)
|
||||
.toEqual ('2fa');
|
||||
expect (res.id)
|
||||
.toEqual (token.id);
|
||||
expect (res.error)
|
||||
.toBeUndefined ();
|
||||
});
|
||||
|
||||
it ('should reject an invalid access token', () => {
|
||||
@ -84,6 +96,10 @@ describe ('authority', () => {
|
||||
.toEqual ('none');
|
||||
expect (res.next_module)
|
||||
.toBeUndefined ();
|
||||
expect (res.id)
|
||||
.toEqual ('');
|
||||
expect (res.error)
|
||||
.toEqual ('invalid signature');
|
||||
});
|
||||
|
||||
it ('should reject blacklisted access token', () => {
|
||||
@ -100,6 +116,10 @@ describe ('authority', () => {
|
||||
.toEqual ('access_token');
|
||||
expect (res.next_module)
|
||||
.toBeUndefined ();
|
||||
expect (res.id)
|
||||
.toEqual (token.id);
|
||||
expect (res.error)
|
||||
.toEqual ('blacklisted');
|
||||
});
|
||||
|
||||
it ('should reject an invalid refresh token', () => {
|
||||
@ -116,6 +136,10 @@ describe ('authority', () => {
|
||||
.toEqual ('none');
|
||||
expect (res.next_module)
|
||||
.toBeUndefined ();
|
||||
expect (res.id)
|
||||
.toEqual ('');
|
||||
expect (res.error)
|
||||
.toEqual ('invalid signature');
|
||||
});
|
||||
|
||||
it ('should reject a blacklisted refresh token', () => {
|
||||
@ -132,5 +156,9 @@ describe ('authority', () => {
|
||||
.toEqual ('refresh_token');
|
||||
expect (res.next_module)
|
||||
.toBeUndefined ();
|
||||
expect (res.id)
|
||||
.toEqual (token.id);
|
||||
expect (res.error)
|
||||
.toEqual ('blacklisted');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user