UNPKG

@loopback/docs

Version:
2,346 lines (1,631 loc) 55.7 kB
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/code-themes/sl-theme.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <div class="navbar navbar-inverse navbar-static-top" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/">docs.strongloop.com</a> </div> <div id="modules"></div> </div> <div class="row"> <div class="col-lg-3 column scroll-spy-target"> <ul class="nav nav-pills nav-stacked"> <div id="versions"></div> <li class="depth-3"> <a href="#AuthenticationComponent">Class: AuthenticationComponent</a> </li> <li class="depth-4"> <a href="#131">constructor()</a> </li> <li class="depth-4"> <a href="#130">providers</a> </li> <li class="depth-3"> <a href="#AuthenticationMetadata">Interface: AuthenticationMetadata</a> </li> <li class="depth-4"> <a href="#79">options</a> </li> <li class="depth-4"> <a href="#78">strategy</a> </li> <li class="depth-3"> <a href="#80">authenticate()</a> </li> <li class="depth-3"> <a href="#90">getAuthenticateMetadata()</a> </li> <li class="depth-3"> <a href="#AuthenticationBindings">Namespace: AuthenticationBindings</a> </li> <li class="depth-4"> <a href="#AUTH_ACTION">AUTH_ACTION</a> </li> <li class="depth-4"> <a href="#CURRENT_USER">CURRENT_USER</a> </li> <li class="depth-4"> <a href="#METADATA">METADATA</a> </li> <li class="depth-4"> <a href="#STRATEGY">STRATEGY</a> </li> <li class="depth-3"> <a href="#AUTHENTICATION_METADATA_KEY">AUTHENTICATION_METADATA_KEY</a> </li> <li class="depth-3"> <a href="#AuthMetadataProvider">Class: AuthMetadataProvider</a> </li> <li class="depth-4"> <a href="#122">constructor()</a> </li> <li class="depth-4"> <a href="#126">value()</a> </li> <li class="depth-3"> <a href="#AuthenticateActionProvider">Class: AuthenticateActionProvider</a> </li> <li class="depth-4"> <a href="#64">constructor()</a> </li> <li class="depth-4"> <a href="#65">getStrategy</a> </li> <li class="depth-4"> <a href="#66">setCurrentUser</a> </li> <li class="depth-4"> <a href="#72">action()</a> </li> <li class="depth-4"> <a href="#70">value()</a> </li> <li class="depth-3"> <a href="#AuthenticateFn">Interface: AuthenticateFn</a> </li> <li class="depth-3"> <a href="#UserProfile">Interface: UserProfile</a> </li> <li class="depth-4"> <a href="#62">email</a> </li> <li class="depth-4"> <a href="#60">id</a> </li> <li class="depth-4"> <a href="#61">name</a> </li> <li class="depth-3"> <a href="#PassportRequest">Type: PassportRequest</a> </li> <li class="depth-3"> <a href="#ShimRequest">Class: ShimRequest</a> </li> <li class="depth-4"> <a href="#8">constructor()</a> </li> <li class="depth-4"> <a href="#3">headers</a> </li> <li class="depth-4"> <a href="#7">method</a> </li> <li class="depth-4"> <a href="#6">path</a> </li> <li class="depth-4"> <a href="#4">query</a> </li> <li class="depth-4"> <a href="#5">url</a> </li> <li class="depth-4"> <a href="#43">isAuthenticated()</a> </li> <li class="depth-4"> <a href="#45">isUnauthenticated()</a> </li> <li class="depth-4"> <a href="#25">logIn()</a> </li> <li class="depth-4"> <a href="#41">logOut()</a> </li> <li class="depth-4"> <a href="#11">login()</a> </li> <li class="depth-4"> <a href="#39">logout()</a> </li> <li class="depth-3"> <a href="#StrategyAdapter">Class: StrategyAdapter</a> </li> <li class="depth-4"> <a href="#48">constructor()</a> </li> <li class="depth-4"> <a href="#51">authenticate()</a> </li> </ul> </div> <div class="col-lg-9 col-lg-offset-3 column" data-spy="scroll" data-target=".scroll-spy-target" data-offset="0"> <div class="readability"> <section class="code-doc "> <a name="AuthenticationComponent"></a> <h3 class="code-ref">Class: authenticationcomponent = new AuthenticationComponent()</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="130"></a> <strong class="code-arg-name"> providers </strong> </td> <td class="code-arg-types"> <code><a href="#ProviderMap">ProviderMap</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> </td> </tr> </table> </section> <section class="code-doc "> <a name="131"></a> <h4 class="code-ref">constructor() : <a href="#AuthenticationComponent">AuthenticationComponent</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> </section> <section class="code-doc "> <a name="AuthenticationMetadata"></a> <h3 class="code-ref">Interface: AuthenticationMetadata</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Authentication metadata stored via Reflection API</p> </p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="79"></a> <strong class="code-arg-name"> options </strong> </td> <td class="code-arg-types"> <code><a href="#Object">Object</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Authentication metadata stored via Reflection API</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="78"></a> <strong class="code-arg-name"> strategy </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Authentication metadata stored via Reflection API</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="80"></a> <h3 class="code-ref">Function: authenticate</h3> <section class="code-doc "> <a name="80"></a> <h4 class="code-ref">authenticate(strategyName: string, options: <a href="#Object">Object</a>) : anonymous</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Mark a controller method as requiring authenticated user.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> strategyName </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The name of the authentication strategy to use.</p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> options </strong> </td> <td class="code-arg-types"> <code><a href="#Object">Object</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>Additional options to configure the authentication.</p> </p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="90"></a> <h3 class="code-ref">Function: getAuthenticateMetadata</h3> <section class="code-doc "> <a name="90"></a> <h4 class="code-ref">getAuthenticateMetadata(controllerClass: <a href="#Constructor">Constructor</a>&lt;<a href="#__type">__type</a>&gt;, methodName: string) : <a href="#AuthenticationMetadata">AuthenticationMetadata</a> | undefined</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Fetch authentication metadata stored by <code>@authenticate</code> decorator.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> controllerClass </strong> </td> <td class="code-arg-types"> <code><a href="#Constructor">Constructor</a>&lt;<a href="#__type">__type</a>&gt;</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>Target controller</p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> methodName </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>Target method</p> </p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="AuthenticationBindings"></a> <h3 class="code-ref">Namespace: AuthenticationBindings</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Binding keys used by this component.</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="AUTH_ACTION"></a> <h3 class="code-ref">const AuthenticationBindings.AUTH_ACTION = BindingKey.create<AuthenticateFn>( 'authentication.actions.authenticate', )</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Key used to inject the authentication function into the sequence.</p> </p> <p><pre><code class="lang-ts">class MySequence implements SequenceHandler { constructor( @inject(AuthenticationBindings.AUTH_ACTION) protected authenticateRequest: AuthenticateFn, // ... other sequence action injections ) {} async handle(req: ParsedRequest, res: ServerResponse) { try { const route = this.findRoute(req); // Authenticate await this.authenticateRequest(req); // Authentication successful, proceed to invoke controller const args = await this.parseParams(req, route); const result = await this.invoke(route, args); this.send(res, result); } catch (err) { this.reject(res, req, err); return; } } } </code></pre> </p> </div> </section> <section class="code-doc "> <a name="CURRENT_USER"></a> <h3 class="code-ref">const AuthenticationBindings.CURRENT_USER = BindingKey.create<UserProfile | undefined>( 'authentication.currentUser', )</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Key used to inject the user instance retrieved by the authentication function</p> </p> <p><p>class MyController { constructor( @inject(AuthenticationBindings.CURRENT_USER) private user: UserProfile, ) {}</p> <p>// ... routes that may need authentication }</p> </p> </div> </section> <section class="code-doc "> <a name="METADATA"></a> <h3 class="code-ref">const AuthenticationBindings.METADATA = BindingKey.create<AuthenticationMetadata | undefined>( 'authentication.operationMetadata', )</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Key used to inject authentication metadata, which is used to determine whether a request requires authentication or not.</p> </p> <p><pre><code class="lang-ts">class MyPassportStrategyProvider implements Provider&lt;Strategy | undefined&gt; { constructor( @inject(AuthenticationBindings.METADATA) private metadata: AuthenticationMetadata, ) {} value(): ValueOrPromise&lt;Strategy | undefined&gt; { if (this.metadata) { const name = this.metadata.strategy; // logic to determine which authentication strategy to return } } } </code></pre> </p> </div> </section> <section class="code-doc "> <a name="STRATEGY"></a> <h3 class="code-ref">const AuthenticationBindings.STRATEGY = BindingKey.create<Strategy | undefined>( 'authentication.strategy', )</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Key used to bind an authentication strategy to the context for the authentication function to use.</p> </p> <p><pre><code class="lang-ts">server .bind(AuthenticationBindings.STRATEGY) .toProvider(MyPassportStrategyProvider); </code></pre> </p> </div> </section> <section class="code-doc "> <a name="AUTHENTICATION_METADATA_KEY"></a> <h3 class="code-ref">const AUTHENTICATION_METADATA_KEY = MetadataAccessor.create< AuthenticationMetadata >('authentication.operationsMetadata')</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>The key used to store log-related via @loopback/metadata and reflection.</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="AuthMetadataProvider"></a> <h3 class="code-ref">Class: authmetadataprovider = new AuthMetadataProvider()</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </section> <section class="code-doc "> <a name="122"></a> <h4 class="code-ref">constructor(controllerClass: <a href="#Constructor">Constructor</a>&lt;<a href="#__type">__type</a>&gt;, methodName: string) : <a href="#AuthMetadataProvider">AuthMetadataProvider</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> controllerClass </strong> </td> <td class="code-arg-types"> <code><a href="#Constructor">Constructor</a>&lt;<a href="#__type">__type</a>&gt;</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> methodName </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="126"></a> <h4 class="code-ref">value() : <a href="#AuthenticationMetadata">AuthenticationMetadata</a> | undefined</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> Returns: <p><p>AuthenticationMetadata</p> </p> </section> <section class="code-doc "> <a name="AuthenticateActionProvider"></a> <h3 class="code-ref">Class: authenticateactionprovider = new AuthenticateActionProvider()</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="65"></a> <strong class="code-arg-name"> getStrategy </strong> </td> <td class="code-arg-types"> <code><a href="#Getter">Getter</a>&lt;<a href="#Strategy">Strategy</a>&gt;</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> constructorProperty exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="66"></a> <strong class="code-arg-name"> setCurrentUser </strong> </td> <td class="code-arg-types"> <code><a href="#Setter">Setter</a>&lt;<a href="#UserProfile">UserProfile</a>&gt;</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> constructorProperty exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="64"></a> <h4 class="code-ref">constructor(getStrategy: <a href="#Getter">Getter</a>&lt;<a href="#Strategy">Strategy</a>&gt;, setCurrentUser: <a href="#Setter">Setter</a>&lt;<a href="#UserProfile">UserProfile</a>&gt;) : <a href="#AuthenticateActionProvider">AuthenticateActionProvider</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> getStrategy </strong> </td> <td class="code-arg-types"> <code><a href="#Getter">Getter</a>&lt;<a href="#Strategy">Strategy</a>&gt;</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> setCurrentUser </strong> </td> <td class="code-arg-types"> <code><a href="#Setter">Setter</a>&lt;<a href="#UserProfile">UserProfile</a>&gt;</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="72"></a> <h4 class="code-ref">action(request: <a href="#ParsedRequest">ParsedRequest</a>) : <a href="#Promise">Promise</a>&lt;<a href="#UserProfile">UserProfile</a> | undefined&gt;</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>The implementation of authenticate() sequence action.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> request </strong> </td> <td class="code-arg-types"> <code><a href="#ParsedRequest">ParsedRequest</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>Parsed Request</p> </p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="70"></a> <h4 class="code-ref">value() : <a href="#AuthenticateFn">AuthenticateFn</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> Returns: <p><p>authenticateFn</p> </p> </section> <section class="code-doc "> <a name="AuthenticateFn"></a> <h3 class="code-ref">Interface: AuthenticateFn</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>interface definition of a function which accepts a request and returns an authenticated user</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="UserProfile"></a> <h3 class="code-ref">Interface: UserProfile</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>interface definition of a user profile <a href="http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims">http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims</a></p> </p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="62"></a> <strong class="code-arg-name"> email </strong> </td> <td class="code-arg-types"> <code>undefined | string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>interface definition of a user profile <a href="http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims">http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims</a></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="60"></a> <strong class="code-arg-name"> id </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>interface definition of a user profile <a href="http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims">http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims</a></p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="61"></a> <strong class="code-arg-name"> name </strong> </td> <td class="code-arg-types"> <code>undefined | string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>interface definition of a user profile <a href="http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims">http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims</a></p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="ShimRequest"></a> <h3 class="code-ref">Class: shimrequest = new ShimRequest()</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="3"></a> <strong class="code-arg-name"> headers </strong> </td> <td class="code-arg-types"> <code><a href="#Object">Object</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="7"></a> <strong class="code-arg-name"> method </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="6"></a> <strong class="code-arg-name"> path </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="4"></a> <strong class="code-arg-name"> query </strong> </td> <td class="code-arg-types"> <code><a href="#Object">Object</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="5"></a> <strong class="code-arg-name"> url </strong> </td> <td class="code-arg-types"> <code>string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="8"></a> <h4 class="code-ref">constructor(request: <a href="#ParsedRequest">ParsedRequest</a>) : <a href="#ShimRequest">ShimRequest</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> request </strong> </td> <td class="code-arg-types"> <code><a href="#ParsedRequest">ParsedRequest</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="43"></a> <h4 class="code-ref">isAuthenticated() : boolean</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> </section> <section class="code-doc "> <a name="45"></a> <h4 class="code-ref">isUnauthenticated() : boolean</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> </section> <section class="code-doc "> <a name="25"></a> <h4 class="code-ref">logIn(user: any, done: (err: any) => void) : void</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> user </strong> </td> <td class="code-arg-types"> <code>any</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> done </strong> </td> <td class="code-arg-types"> <code>anonymous</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="25"></a> <h4 class="code-ref">logIn(user: any, options: any, done: (err: any) => void) : void</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> user </strong> </td> <td class="code-arg-types"> <code>any</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> options </strong> </td> <td class="code-arg-types"> <code>any</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> done </strong> </td> <td class="code-arg-types"> <code>anonymous</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="41"></a> <h4 class="code-ref">logOut() : void</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> </section> <section class="code-doc "> <a name="11"></a> <h4 class="code-ref">login(user: any, done: (err: any) => void) : void</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> user </strong> </td> <td class="code-arg-types"> <code>any</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> done </strong> </td> <td class="code-arg-types"> <code>anonymous</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="11"></a> <h4 class="code-ref">login(user: any, options: any, done: (err: any) => void) : void</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> user </strong> </td> <td class="code-arg-types"> <code>any</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> options </strong> </td> <td class="code-arg-types"> <code>any</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Shimmed Request to satisfy express requirements of passport strategies.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-