All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.soffa.foundation.core.security.TokenProvider Maven / Gradle / Ivy

The newest version!
package io.soffa.foundation.core.security;


import io.soffa.foundation.core.models.Authentication;
import io.soffa.foundation.core.security.model.TokensConfig;
import io.soffa.foundation.models.Token;
import io.soffa.foundation.models.TokenType;

import java.util.Map;

public interface TokenProvider {

    default Token create(TokenType type, String subject) {
        return create(type, subject, null);
    }

    Token create(TokenType type, String subject, Map claims);

    Token create(TokenType type, String subject, Map claims, int ttlInSeconds);

    Authentication decode(String token, ClaimsExtractor extractor);

    Authentication decode(String token);

    Authentication extractInfo(Token token);

    TokensConfig getConfig();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy