- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for generateAccessToken (0.27 sec)
-
src/test/java/org/codelibs/fess/helper/AccessTokenHelperTest.java
final String token = accessTokenHelper.generateAccessToken(); MockletHttpServletRequest req = getMockRequest(); req.addHeader("Authorization", "Bearer " + token); assertEquals(token, accessTokenHelper.getAccessTokenFromRequest(req)); } public void test_getAccessTokenFromRequest_ok1() { final String token = accessTokenHelper.generateAccessToken();
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 3.1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/AccessTokenHelper.java
import jakarta.servlet.http.HttpServletRequest; public class AccessTokenHelper { protected static final String BEARER = "Bearer"; protected Random random = new SecureRandom(); public String generateAccessToken() { return RandomStringUtils.random(ComponentUtil.getFessConfig().getApiAccessTokenLengthAsInteger(), 0, 0, true, true, null, random); }
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 2.1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/accesstoken/ApiAdminAccesstokenAction.java
validateApi(body, messages -> {}); body.crudMode = CrudMode.CREATE; final AccessToken accessToken = getAccessToken(body).map(entity -> { entity.setToken(accessTokenHelper.generateAccessToken()); try { accessTokenService.store(entity); } catch (final Exception e) { logger.warn("Failed to process a request.", e);
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 7K bytes - Viewed (0)