Show / Hide Table of Contents

Class ApiTokenController

Inheritance
object
ApiTokenController
Implements
IApiTokenController
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DotNetNuke.Web.Api.Auth.ApiTokens
Assembly: DotNetNuke.Web.dll
Syntax
public class ApiTokenController : IApiTokenController

Constructors

ApiTokenController(IApiTokenRepository, IEventLogger)

Declaration
public ApiTokenController(IApiTokenRepository apiTokenRepository, IEventLogger eventLogger)
Parameters
Type Name Description
IApiTokenRepository apiTokenRepository
IEventLogger eventLogger

Properties

SchemeType

Declaration
public string SchemeType { get; }
Property Value
Type Description
string

Methods

ApiTokenKeyList(ApiTokenScope, string)

Declaration
public SortedDictionary<string, ApiTokenAttribute> ApiTokenKeyList(ApiTokenScope scope, string locale)
Parameters
Type Name Description
ApiTokenScope scope
string locale
Returns
Type Description
SortedDictionary<string, ApiTokenAttribute>

CreateApiToken(int, string, ApiTokenScope, DateTime, string, int)

Declaration
public string CreateApiToken(int portalId, string tokenName, ApiTokenScope scope, DateTime expiresOn, string apiKeys, int userId)
Parameters
Type Name Description
int portalId
string tokenName
ApiTokenScope scope
DateTime expiresOn
string apiKeys
int userId
Returns
Type Description
string

DeleteExpiredAndRevokedApiTokens(int, int)

Declaration
public void DeleteExpiredAndRevokedApiTokens(int portalId, int userId)
Parameters
Type Name Description
int portalId
int userId

GetApiToken(int)

Declaration
public ApiToken GetApiToken(int apiTokenId)
Parameters
Type Name Description
int apiTokenId
Returns
Type Description
ApiToken

GetApiTokens(ApiTokenScope, bool, int, int, ApiTokenFilter, string, int, int)

Declaration
public IPagedList<ApiToken> GetApiTokens(ApiTokenScope scope, bool includeNarrowerScopes, int portalId, int userId, ApiTokenFilter filter, string apiKey, int pageIndex, int pageSize)
Parameters
Type Name Description
ApiTokenScope scope
bool includeNarrowerScopes
int portalId
int userId
ApiTokenFilter filter
string apiKey
int pageIndex
int pageSize
Returns
Type Description
IPagedList<ApiToken>

GetCurrentThreadApiToken()

Declaration
public ApiToken GetCurrentThreadApiToken()
Returns
Type Description
ApiToken

RevokeOrDeleteApiToken(ApiToken, bool, int)

Declaration
public void RevokeOrDeleteApiToken(ApiToken token, bool delete, int userId)
Parameters
Type Name Description
ApiToken token
bool delete
int userId

SetApiTokenForRequest(ApiToken)

Declaration
public void SetApiTokenForRequest(ApiToken token)
Parameters
Type Name Description
ApiToken token

ValidateToken(HttpRequestMessage)

Declaration
public (ApiToken Token, UserInfo User) ValidateToken(HttpRequestMessage request)
Parameters
Type Name Description
HttpRequestMessage request
Returns
Type Description
(ApiToken Token, UserInfo User)

Implements

IApiTokenController

Extension Methods

JsonExtensionsWeb.ToJson(object)
Back to top by the community, for the community... #DNNCMS