C# 클래스 Microsoft.Legal.MatterCenter.Utility.SPOAuthorization

This class is used for reading authorization token which has been sent by the client.This class will validate the client token, get the token for the service from Azure Active Directory and pass the service token to sharepoint
상속: ISPOAuthorization
파일 보기 프로젝트 열기: Microsoft/mattercenter

Private Properties

프로퍼티 타입 설명
GetAccessToken Task
GetAccessTokenForGraph Task
GetClientContextWithAccessToken ClientContext

공개 메소드들

메소드 설명
GetClientContext ( string url ) : ClientContext

This method will get the access token for the service and creats SharePoint ClientContext object and returns that object

GetGraphAccessToken ( ) : string

This method will get the access token for the Microsoft Graph and returns that token

SPOAuthorization ( IOptions generalSettings, IOptions errorSettings, IOptions logTables, ICustomLogger customLogger, IHttpContextAccessor httpContextAccessor ) : System

Constructor where GeneralSettings and ErrorSettings are injected

비공개 메소드들

메소드 설명
GetAccessToken ( ) : Task

This method will get access for the web api from the Azure Active Directory. This method internally uses the Authorization token sent by the UI application

GetAccessTokenForGraph ( ) : Task

This method will get access for the web api from the Azure Active Directory. This method internally uses the Authorization token sent by the UI application

GetClientContextWithAccessToken ( string targetUrl, string accessToken ) : ClientContext

Uses the specified access token to create a client context. For each and every request to SPO an authorization header will be sent. With out authorization header, SPO will reject the request

메소드 상세

GetClientContext() 공개 메소드

This method will get the access token for the service and creats SharePoint ClientContext object and returns that object
public GetClientContext ( string url ) : ClientContext
url string The SharePoint Url for which the client context needs to be creatwed
리턴 ClientContext

GetGraphAccessToken() 공개 메소드

This method will get the access token for the Microsoft Graph and returns that token
public GetGraphAccessToken ( ) : string
리턴 string

SPOAuthorization() 공개 메소드

Constructor where GeneralSettings and ErrorSettings are injected
public SPOAuthorization ( IOptions generalSettings, IOptions errorSettings, IOptions logTables, ICustomLogger customLogger, IHttpContextAccessor httpContextAccessor ) : System
generalSettings IOptions
errorSettings IOptions
logTables IOptions
customLogger ICustomLogger
httpContextAccessor IHttpContextAccessor
리턴 System