Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d-koppenhagen/webfinger
A webfinger client written in TypeScript
https://github.com/d-koppenhagen/webfinger
client identity javascript library typescript webfinger
Last synced: 23 days ago
JSON representation
A webfinger client written in TypeScript
- Host: GitHub
- URL: https://github.com/d-koppenhagen/webfinger
- Owner: d-koppenhagen
- License: lgpl-3.0
- Created: 2017-06-13T19:43:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-15T23:20:31.000Z (over 4 years ago)
- Last Synced: 2024-10-30T05:43:07.739Z (2 months ago)
- Topics: client, identity, javascript, library, typescript, webfinger
- Language: TypeScript
- Size: 1.13 MB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# webfinger-client
[![NPM version][npm-image]][npm-url]A webfinger client that runs both in the browser and in node.js.
The Client is based on Nick Jennings library [webfinger.js](https://github.com/silverbucket/webfinger.js) but has been rewritten in TypeScript.## Demo
Check out the Demo at GitHub Pages: [https://d-koppenhagen.github.io/webfinger/](https://d-koppenhagen.github.io/webfinger/)## Features
* defaults to TLS only
* optional URI fallback (for older services which use `host-meta` or `host-meta.json` URI endpoints)
* optional support for [WebFist](http://webfist.org)## Demo
clone this repository, run `npm install` and finally `npm start`## Install
Install the client as a dependency:```bash
npm install --save webfinger-client
```## Usage
### Import
You have to import the module before using it:```typescript
import { WebFinger } from 'webfinger';
```### Use
```typescript
let webfinger = new WebFinger({
webfistFallback: true, // defaults to false
tlsOnly: true, // defaults to true
uriFallback: false, // defaults to false
requestTimeout: 10000, // defaults to 10000
});webfinger.lookup('[email protected]', function (err, p) {
if (err) {
console.log('error: ', err.message);
} else {
console.log(p);
}
});// example output:
// {
// idx: {
// properties: {
// name: "Alice Henderson"
// },
// links: {
// avatar: [{ href: '' }],
// blog: [{ href: '' }],
// vcard: [href: '