View Javadoc
1   /*
2    * Copyright © 2025 rosestack.github.io
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package io.github.rose.security.support;
17  
18  import io.github.rose.security.util.SecurityUser;
19  import io.github.rose.security.util.TokenPair;
20  
21  /**
22   * @author <a href="mailto:ichensoul@gmail.com">chensoul</a>
23   * @since
24   */
25  public interface TokenFactory {
26  
27      TokenPair createPreVerificationTokenPair(SecurityUser securityUser);
28  
29      TokenPair createTokenPair(SecurityUser securityUser);
30  
31      SecurityUser parseAccessToken(String accessToken);
32  
33      SecurityUser parseRefreshToken(String refreshToken);
34  }