C# Class Microsoft.PowerBI.Security.PowerBIToken

The Power BI app token used to authenticate with Power BI Embedded services
Mostrar archivo Open project: Microsoft/PowerBI-CSharp Class Usage Examples

Public Methods

Method Description
CreateReportEmbedToken ( string workspaceCollectionName, string workspaceId, string reportId, System.DateTime expiration, string username = null, IEnumerable roles = null ) : PowerBIToken

Creates a embed token with default expiration used to embed Power BI components into your own applications

CreateReportEmbedToken ( string workspaceCollectionName, string workspaceId, string reportId, System.TimeSpan slidingExpiration, string username = null, IEnumerable roles = null ) : PowerBIToken

Creates a embed token with default expiration used to embed Power BI components into your own applications

CreateReportEmbedToken ( string workspaceCollectionName, string workspaceId, string reportId, string username = null, IEnumerable roles = null ) : PowerBIToken

Creates a embed token with default expiration used to embed Power BI components into your own applications

Generate ( string accessKey = null ) : string

Generates an app token with the specified claims and signs it the the configured signing key.

PowerBIToken ( ) : System

Represents an access token used to authenticate and authorize against Power BI Platform services

ToString ( ) : string

Returns a string that represents the current object.

ToString ( string accessKey ) : string

Returns a JWT token string that represents the current object

Private Methods

Method Description
InitDefaultClaims ( ) : void
ValidateToken ( ) : void

Method Details

CreateReportEmbedToken() public static method

Creates a embed token with default expiration used to embed Power BI components into your own applications
public static CreateReportEmbedToken ( string workspaceCollectionName, string workspaceId, string reportId, System.DateTime expiration, string username = null, IEnumerable roles = null ) : PowerBIToken
workspaceCollectionName string The workspace collection name
workspaceId string The workspace id
reportId string The report id
expiration System.DateTime The token expiration date/time
username string The RLS username
roles IEnumerable The RLS roles
return PowerBIToken

CreateReportEmbedToken() public static method

Creates a embed token with default expiration used to embed Power BI components into your own applications
public static CreateReportEmbedToken ( string workspaceCollectionName, string workspaceId, string reportId, System.TimeSpan slidingExpiration, string username = null, IEnumerable roles = null ) : PowerBIToken
workspaceCollectionName string The workspace collection name
workspaceId string The workspace id
reportId string The report id
slidingExpiration System.TimeSpan The timespan to append to the current date/time
username string The RLS username
roles IEnumerable The RLS roles
return PowerBIToken

CreateReportEmbedToken() public static method

Creates a embed token with default expiration used to embed Power BI components into your own applications
public static CreateReportEmbedToken ( string workspaceCollectionName, string workspaceId, string reportId, string username = null, IEnumerable roles = null ) : PowerBIToken
workspaceCollectionName string The workspace collection name
workspaceId string The workspace id
reportId string The report id
username string The RLS username
roles IEnumerable The RLS roles
return PowerBIToken

Generate() public method

Generates an app token with the specified claims and signs it the the configured signing key.
public Generate ( string accessKey = null ) : string
accessKey string The access key used to sign the app token
return string

PowerBIToken() public method

Represents an access token used to authenticate and authorize against Power BI Platform services
public PowerBIToken ( ) : System
return System

ToString() public method

Returns a string that represents the current object.
public ToString ( ) : string
return string

ToString() public method

Returns a JWT token string that represents the current object
public ToString ( string accessKey ) : string
accessKey string The access key used to sign the app token
return string