Search in sources :

Example 1 with TokenOptionsBO

use of com.nexblocks.authguard.service.model.TokenOptionsBO in project AuthGuard by AuthGuard.

the class AuthorizationCodeToAccessToken method generateToken.

private Either<Exception, AuthResponseBO> generateToken(final AccountTokenDO accountToken) {
    final TokenOptionsBO options = TokenOptionsBO.builder().source("aut_code").build();
    final TokenRestrictionsBO restrictions = getRestrictions(accountToken);
    return accountsServiceAdapter.getAccount(accountToken.getAssociatedAccountId()).map(account -> accessTokenProvider.generateToken(account, restrictions, options));
}
Also used : TokenOptionsBO(com.nexblocks.authguard.service.model.TokenOptionsBO) TokenRestrictionsBO(com.nexblocks.authguard.service.model.TokenRestrictionsBO)

Aggregations

TokenOptionsBO (com.nexblocks.authguard.service.model.TokenOptionsBO)1 TokenRestrictionsBO (com.nexblocks.authguard.service.model.TokenRestrictionsBO)1