Skip to content

dependabit / github-client/src / AuthManager

Class: AuthManager ​

Defined in: packages/github-client/src/auth.ts:24

Authentication manager that supports multiple auth methods

Constructors ​

Constructor ​

ts
new AuthManager(config): AuthManager;

Defined in: packages/github-client/src/auth.ts:27

Parameters ​

ParameterType
configAuthConfig

Returns ​

AuthManager

Methods ​

authenticate() ​

ts
authenticate(code?): Promise<AuthResult>;

Defined in: packages/github-client/src/auth.ts:58

Perform authentication

Parameters ​

ParameterType
code?string

Returns ​

Promise<AuthResult>


getHandler() ​

ts
getHandler(): 
  | TokenAuthHandler
  | OAuthHandler
  | BasicAuthHandler;

Defined in: packages/github-client/src/auth.ts:85

Get underlying handler

Returns ​

| TokenAuthHandler | OAuthHandler | BasicAuthHandler


getType() ​

ts
getType(): string;

Defined in: packages/github-client/src/auth.ts:78

Get authentication type

Returns ​

string


validate() ​

ts
validate(): boolean;

Defined in: packages/github-client/src/auth.ts:71

Validate authentication configuration

Returns ​

boolean

Released under the MIT License.