Class CreateCredentialTokenHandler
This function is intended to assist in applications where a connection is made to SharePoint using real user credentials instead of ACS or Azure AD. The JSON is deserialized at runtime into CredentialedSharePointConnectionInfo and tested for validity by attempting to connect to the indicated SharePoint site. If the validation succeeds, the function then encrypts the JSON using the client's CredentialedClientConfig in config.json and returns the result as application/json.
A valid client configuration is required.
Inherited Members
Namespace:AzureFunctionsForSharePoint.Functions
Assembly:AzureFunctionsForSharePoint.Functions.dll
Syntax
public class CreateCredentialTokenHandler : FunctionBase
Remarks
This class inherits FunctionBase for its simple logging notification event.
Constructors
| Improve this Doc View SourceCreateCredentialTokenHandler(HttpRequestMessage)
Initializes the handler for a given HttpRequestMessage received from the function trigger
Declaration
public CreateCredentialTokenHandler(HttpRequestMessage request)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpRequestMessage | request | The current request |
Methods
| Improve this Doc View SourceExecute(CreateCredentialTokenFunctionArgs)
Attempts to connect to SharePoint and creates a CredentialedSharePointConnectionInfo returned as application/json
Declaration
public HttpResponseMessage Execute(CreateCredentialTokenFunctionArgs args)
Parameters
Type | Name | Description |
---|---|---|
CreateCredentialTokenFunctionArgs | args | An CreateCredentialTokenFunctionArgs instance specifying the location of the client configuration in Azure storage. |
Returns
Type | Description |
---|---|
System.Net.Http.HttpResponseMessage |