Class RandomSecureAuthenticationTokenCreator
- java.lang.Object
-
- jetbrains.buildServer.serverSide.auth.impl.RandomSecureAuthenticationTokenCreator
-
- All Implemented Interfaces:
AuthenticationTokenCreator
public class RandomSecureAuthenticationTokenCreator extends Object implements AuthenticationTokenCreator
- Author:
- Dmitrii Bogdanov
-
-
Constructor Summary
Constructors Constructor Description RandomSecureAuthenticationTokenCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticationToken
createToken(long ownerId, String identifier, String name, String secureRandom, Date expirationTime, AuthenticationToken.PermissionsRestriction permissionsRestriction)
Token
createToken(long ownerId, String identifier, String name, Date expirationTime)
Creates a token without permissions limitAuthenticationToken
createToken(long ownerId, String identifier, String name, Date expirationTime, AuthenticationToken.PermissionsRestriction permissionsRestriction)
Creates a token with permissions limitboolean
isMyToken(String token)
BearerTokenCredentials
parseToken(String token)
Tryies to parse a token
-
-
-
Method Detail
-
createToken
@NotNull public Token createToken(long ownerId, @NotNull String identifier, @NotNull String name, @NotNull Date expirationTime)
Description copied from interface:AuthenticationTokenCreator
Creates a token without permissions limit- Specified by:
createToken
in interfaceAuthenticationTokenCreator
- Returns:
-
createToken
@NotNull public AuthenticationToken createToken(long ownerId, @NotNull String identifier, @NotNull String name, @NotNull Date expirationTime, @NotNull AuthenticationToken.PermissionsRestriction permissionsRestriction)
Description copied from interface:AuthenticationTokenCreator
Creates a token with permissions limit- Specified by:
createToken
in interfaceAuthenticationTokenCreator
- Returns:
-
createToken
@NotNull public AuthenticationToken createToken(long ownerId, @NotNull String identifier, @NotNull String name, @NotNull String secureRandom, @NotNull Date expirationTime, @NotNull AuthenticationToken.PermissionsRestriction permissionsRestriction)
-
isMyToken
public boolean isMyToken(@NotNull String token)
- Specified by:
isMyToken
in interfaceAuthenticationTokenCreator
- Returns:
- true if the token is generated with this creator
-
parseToken
@NotNull public BearerTokenCredentials parseToken(@NotNull String token)
Description copied from interface:AuthenticationTokenCreator
Tryies to parse a token- Specified by:
parseToken
in interfaceAuthenticationTokenCreator
- Parameters:
token
- to parse- Returns:
- parsed token
-
-