Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for generateAccessToken (0.09 sec)

  1. 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)
  2. 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)
  3. 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)
  4. src/main/java/org/codelibs/fess/app/web/admin/accesstoken/AdminAccesstokenAction.java

            validate(form, messages -> {}, this::asEditHtml);
            verifyToken(this::asEditHtml);
            getAccessToken(form).ifPresent(entity -> {
                entity.setToken(accessTokenHelper.generateAccessToken());
                try {
                    accessTokenService.store(entity);
                    saveInfo(messages -> messages.addSuccessCrudCreateCrudTable(GLOBAL));
                } catch (final Exception e) {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 14.7K bytes
    - Viewed (0)
Back to top