OAuthCard class

Card builder class that simplifies building oauth cards.

Constructors

OAuthCard(Session)

Creates a new OAuthCard.

Methods

button(TextType)

Signin button label.

connectionName(string)

The name of the OAuth connection to use.

create(ChatConnector, Session, string, string, string, (err: Error, message: Message) => void)

Factory method for returning a message with the proper signin attachment

text(TextType, any[])

Title of the Card.

toAttachment()

Returns the JSON for the card,

Constructor Details

OAuthCard(Session)

Creates a new OAuthCard.

new OAuthCard(session?: Session)

Parameters

session
Session

(Optional) will be used to localize any text.

Method Details

button(TextType)

Signin button label.

function button(title: TextType)

Parameters

title
TextType

Returns

connectionName(string)

The name of the OAuth connection to use.

function connectionName(name: string)

Parameters

name

string

Returns

create(ChatConnector, Session, string, string, string, (err: Error, message: Message) => void)

Factory method for returning a message with the proper signin attachment

static function create(connector: ChatConnector, session: Session, connectionName: string, text: string, buttonTitle: string, done: (err: Error, message: Message) => void)

Parameters

connector
ChatConnector
session
Session
connectionName

string

text

string

buttonTitle

string

done

(err: Error, message: Message) => void

text(TextType, any[])

Title of the Card.

function text(prompts: TextType, args: any[])

Parameters

prompts
TextType
args

any[]

Returns

toAttachment()

Returns the JSON for the card,

function toAttachment()

Returns