MsalConnectionManager class
Constructors
| Msal |
Methods
| get |
Get the OAuth connection for the agent. |
| get |
Get the default OAuth connection for the agent. |
| get |
Get the default connection configuration for the agent. |
| get |
Finds a connection based on a map. |
| get |
Finds a connection based on an activity's blueprint. |
Constructor Details
MsalConnectionManager(Map<string, AuthConfiguration>, ConnectionMapItem[], AuthConfiguration)
new MsalConnectionManager(connectionsConfigurations?: Map<string, AuthConfiguration>, connectionsMap?: ConnectionMapItem[], configuration?: AuthConfiguration)
Parameters
- connectionsConfigurations
-
Map<string, AuthConfiguration>
- connectionsMap
- configuration
- AuthConfiguration
Method Details
getConnection(string)
Get the OAuth connection for the agent.
function getConnection(connectionName: string): MsalTokenProvider
Parameters
- connectionName
-
string
The name of the connection.
Returns
The OAuth connection for the agent.
getDefaultConnection()
Get the default OAuth connection for the agent.
function getDefaultConnection(): MsalTokenProvider
Returns
The default OAuth connection for the agent.
getDefaultConnectionConfiguration()
Get the default connection configuration for the agent.
function getDefaultConnectionConfiguration(): AuthConfiguration
Returns
The default connection configuration for the agent.
getTokenProvider(JwtPayload, string)
Finds a connection based on a map.
function getTokenProvider(identity: JwtPayload, serviceUrl: string): MsalTokenProvider
Parameters
- identity
-
JwtPayload
The identity. Usually TurnContext.identity.
- serviceUrl
-
string
The service URL.
Returns
The TokenProvider for the connection.
Remarks
Example environment variables: connectionsMap__0__connection=seviceConnection connectionsMap__0__serviceUrl=http://..botframework.com/ connectionsMap__0__audience=optional connectionsMap__1__connection=agentic connectionsMap__1__serviceUrl=agentic
ServiceUrl is: A regex to match with, or "*" for any serviceUrl value. Connection is: A name in the 'Connections' list.
getTokenProviderFromActivity(JwtPayload, Activity)
Finds a connection based on an activity's blueprint.
function getTokenProviderFromActivity(identity: JwtPayload, activity: Activity): MsalTokenProvider
Parameters
- identity
-
JwtPayload
The identity. Usually TurnContext.identity.
- activity
- Activity
The activity.
Returns
The TokenProvider for the connection.