package com.qmth.boot.test.core.security.model;

import com.qmth.boot.core.security.service.AuthorizationService;
import com.qmth.boot.tools.signature.SignatureType;

public class TestAuthorizationService implements AuthorizationService<TestAccessEntity> {

    public String secret;

    public boolean disturb = false;

    @Override
    public TestAccessEntity findByIdentity(String identity, SignatureType type, String path) {
        if (disturb) {
            return null;
        }
        TestAccessEntity entity = new TestAccessEntity();
        entity.identity = identity;
        entity.secret = secret;
        return entity;
    }

}
