Home Reference Source Test
public class | source

IdpProxyStub

Identity Provider Proxy Protocol Stub

Constructor Summary

Public Constructor
public

constructor(messageBus: messageBus, Domain: domain, identity: idpProxy)

Constructor of the IdpProxy Stub The constructor add a listener in the messageBus received and start a web worker with the idpProxy received

Method Summary

Public Methods
public

generate(parameters: params): Promise

function that makes a request for an identity assertion to the web worker running the idpProxy

public

login(parameters: params): Promise

function that makes a request for a user identity to the web worker running the idpProxy

public

replyMessage(message: message, value: value)

This function receives a message and a value.

public

requestToIdp(message: message)

Function that see the intended method in the message received and call the respective function

public

start(identity: idpProxy): string

Starts a web worker with the idpProxy javascipt file

public

validate(parameters: params): Promise

function that makes a request to validate an identity assertion to the web worker running the idpProxy

Public Constructors

public constructor(messageBus: messageBus, Domain: domain, identity: idpProxy) source

Constructor of the IdpProxy Stub The constructor add a listener in the messageBus received and start a web worker with the idpProxy received

Params:

NameTypeAttributeDescription
messageBus messageBus
Domain domain
identity idpProxy

Provider Proxy javascript file

Public Methods

public generate(parameters: params): Promise source

function that makes a request for an identity assertion to the web worker running the idpProxy

Params:

NameTypeAttributeDescription
parameters params

received in the message. In this case contains the content, origin and usernamehint

Return:

Promise

returns a promise with an identity assertion generate by the idpProxy

public login(parameters: params): Promise source

function that makes a request for a user identity to the web worker running the idpProxy

Params:

NameTypeAttributeDescription
parameters params

received in the message. In this case contains the login scope

Return:

Promise

returns a promise an URL so the Identity Module can use to obtain an identity

public replyMessage(message: message, value: value) source

This function receives a message and a value. It replies the value to the sender of the message received

Params:

NameTypeAttributeDescription
message message

received

value value

to include in the new message to send

public requestToIdp(message: message) source

Function that see the intended method in the message received and call the respective function

Params:

NameTypeAttributeDescription
message message

received in the messageBus

public start(identity: idpProxy): string source

Starts a web worker with the idpProxy javascipt file

Params:

NameTypeAttributeDescription
identity idpProxy

Provider Proxy javascript file

Return:

string

public validate(parameters: params): Promise source

function that makes a request to validate an identity assertion to the web worker running the idpProxy

Params:

NameTypeAttributeDescription
parameters params

received in the message. In this case contains the identity assertion and origin

Return:

Promise

returns a promise with the identity assertion validation result, received by the idpProxy