Skip to content

Package: AccessTokenFactory

AccessTokenFactory

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.authentication.token;
14:
15: import org.eclipse.kapua.model.KapuaEntityFactory;
16: import org.eclipse.kapua.model.id.KapuaId;
17:
18: import java.util.Date;
19:
20: /**
21: * {@link AccessTokenFactory} definition.
22: *
23: * @see org.eclipse.kapua.model.KapuaEntityFactory
24: * @since 1.0.0
25: */
26: public interface AccessTokenFactory extends KapuaEntityFactory<AccessToken, AccessTokenCreator, AccessTokenQuery, AccessTokenListResult> {
27:
28: /**
29: * Instantiates a new {@link AccessTokenCreator}.
30: *
31: * @param scopeId The scope {@link KapuaId} to set into the{@link AccessToken}.
32: * @param userId The {@link org.eclipse.kapua.service.user.User} {@link KapuaId} to set into the{@link AccessToken}.
33: * @param tokenId The token id to set into the{@link AccessToken}.
34: * @param expiresOn The expiration date to set into the{@link AccessToken}.
35: * @param refreshToken The refresh token to set into the{@link AccessToken}.
36: * @return The newly instantiated {@link AccessTokenCreator}.
37: * @since 1.0.0
38: */
39: AccessTokenCreator newCreator(KapuaId scopeId, KapuaId userId, String tokenId, Date expiresOn, String refreshToken, Date refreshExpiresOn);
40:
41: /**
42: * Instantiates a new {@link LoginInfo}
43: *
44: * @return a new {@link LoginInfo} object
45: */
46: LoginInfo newLoginInfo();
47:
48: }