
io.getlime.security.powerauth.rest.api.spring.encryption.EncryptionScope Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of powerauth-restful-security-spring-annotation Show documentation
Show all versions of powerauth-restful-security-spring-annotation Show documentation
PowerAuth RESTful API Security Annotations for Spring
/*
* PowerAuth integration libraries for RESTful API applications, examples and
* related software components
*
* Copyright (C) 2023 Wultra s.r.o.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package io.getlime.security.powerauth.rest.api.spring.encryption;
import io.getlime.security.powerauth.crypto.lib.encryptor.model.EncryptorScope;
/**
* Enumeration of application scopes for encryptor.
*/
public enum EncryptionScope {
/**
* Application scope (non-personalized).
*/
APPLICATION_SCOPE,
/**
* Activation scope (personalized).
*/
ACTIVATION_SCOPE;
/**
* Translate this scope object into {@link EncryptorScope} used by low level PowerAuth Crypto library.
* @return Translated {@link EncryptorScope}.
*/
public EncryptorScope toEncryptorScope() {
return switch (this) {
case APPLICATION_SCOPE -> EncryptorScope.APPLICATION_SCOPE;
case ACTIVATION_SCOPE -> EncryptorScope.ACTIVATION_SCOPE;
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy