Interface IFortnoxConnectionService
Handles connections with Fortnox.
public interface IFortnoxConnectionService
Methods
BuildConnectUriAsync(string, FortnoxScope)
Use this method to get a url to initiat connection with fortnox.
ValueTask<Uri> BuildConnectUriAsync(string requestKey, FortnoxScope scopes)
Parameters
requestKeystringA key for the request so that callbacks can be identified. Your application can generate this by using 'Guid.NewGuid()'.
scopesFortnoxScopeFlag enum to specify the access scopes requested.
Returns
ConnectAsync(FortnoxAssignment)
Connect the application with Fortnox.
Task<Result<TokenData>> ConnectAsync(FortnoxAssignment assignment)
Parameters
assignmentFortnoxAssignment
Returns
DisconnectAsync(string)
Disconnect the application from Fortnox.
Task<Result> DisconnectAsync(string refreshToken)
Parameters
refreshTokenstring
Returns
RefreshTokenAsync(string)
Retrieve a new access token using the refresh token.
Task<Result<TokenData>> RefreshTokenAsync(string refreshToken)
Parameters
refreshTokenstring