Skip to content

Commit

Permalink
feat: Added external authentication support
Browse files Browse the repository at this point in the history
Added external authentication support
  • Loading branch information
André Bires Fonseca (Takenet) committed Feb 7, 2017
1 parent 34d1922 commit 6b24bc4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Lime/Protocol/Security/Authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,28 @@ export class KeyAuthentication extends Authentication {
this.key = key;
}
}
export class ExternalAuthentication extends Authentication {
scheme = AuthenticationScheme.EXTERNAL;
token: string;
issuer: string;
constructor(token: string, issuer: string) {
super();
this.token = token;
this.issuer = issuer;
}
}

export const AuthenticationScheme = {
GUEST: <AuthenticationScheme> "guest",
PLAIN: <AuthenticationScheme> "plain",
TRANSPORT: <AuthenticationScheme> "transport",
KEY: <AuthenticationScheme> "key"
KEY: <AuthenticationScheme> "key",
EXTERNAL: <AuthenticationScheme> "external",
};
export type AuthenticationScheme
= "guest"
| "plain"
| "transport"
| "key"
| "external"
;

0 comments on commit 6b24bc4

Please sign in to comment.