<commit_before>/*
 * JBoss, Home of Professional Open Source.
 * Copyright 2014 Red Hat, Inc., and individual contributors
 * as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.wildfly.extension.elytron.junk;

import java.security.Principal;

import org.wildfly.security.auth.SecurityIdentity;
import org.wildfly.security.auth.login.AuthenticationException;
import org.wildfly.security.auth.provider.CredentialSupport;
import org.wildfly.security.auth.provider.RealmIdentity;
import org.wildfly.security.auth.provider.SecurityRealm;
import org.wildfly.security.auth.verifier.Verifier;

/**
 * A dummy {@link SecurityRealm} implementation that doesn't do anything.
 *
 * Just gives us something we can inject.
 *
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */
public class DummySecurityRealm implements SecurityRealm {

    private static final RealmIdentity IDENTITY_INSTANCE = new DummyRealmIdentity();

    @Override
    public RealmIdentity createRealmIdentity(String name) {
        return IDENTITY_INSTANCE;
    }

    @Override
    public RealmIdentity createRealmIdentity(Principal principal) {
        return IDENTITY_INSTANCE;
    }

    @Override
    public CredentialSupport getCredentialSupport(Class<?> credentialType) {
        return CredentialSupport.UNSUPPORTED;
    }

    private static final class DummyRealmIdentity implements RealmIdentity {

        @Override
        public String getRealmName() {
            return null;
        }

        @Override
        public Principal getPrincipal() {
            return null;
        }

        @Override
        public CredentialSupport getCredentialSupport(Class<?> credentialType) {
            return CredentialSupport.UNSUPPORTED;
        }

        @Override
        public <P> P proveAuthentic(Verifier<P> verifier) throws AuthenticationException {
            return null;
        }

        @Override
        public <C> C getCredential(Class<C> credentialType) {
            return null;
        }

        @Override
        public SecurityIdentity createSecurityIdentity() {
            return null;
        }

    }

}<commit_msg>Minor API update to bring in-line with latest Elytron.<commit_after>/*
 * JBoss, Home of Professional Open Source.
 * Copyright 2014 Red Hat, Inc., and individual contributors
 * as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.wildfly.extension.elytron.junk;

import java.security.Principal;

import org.wildfly.security.auth.login.AuthenticationException;
import org.wildfly.security.auth.provider.CredentialSupport;
import org.wildfly.security.auth.provider.RealmIdentity;
import org.wildfly.security.auth.provider.SecurityRealm;

/**
 * A dummy {@link SecurityRealm} implementation that doesn't do anything.
 *
 * Just gives us something we can inject.
 *
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */
public class DummySecurityRealm implements SecurityRealm {

    private static final RealmIdentity IDENTITY_INSTANCE = new DummyRealmIdentity();

    @Override
    public RealmIdentity createRealmIdentity(String name) {
        return IDENTITY_INSTANCE;
    }

    @Override
    public RealmIdentity createRealmIdentity(Principal principal) {
        return IDENTITY_INSTANCE;
    }

    @Override
    public CredentialSupport getCredentialSupport(Class<?> credentialType) {
        return CredentialSupport.UNSUPPORTED;
    }

    private static final class DummyRealmIdentity implements RealmIdentity {

        @Override
        public String getRealmName() {
            return null;
        }

        @Override
        public Principal getPrincipal() {
            return null;
        }

        @Override
        public CredentialSupport getCredentialSupport(Class<?> credentialType) {
            return CredentialSupport.UNSUPPORTED;
        }

        @Override
        public <C> C getCredential(Class<C> credentialType) {
            return null;
        }

    }

}
{'fraction_non_alphanumeric': 0.07629482071713148, 'fraction_numerical': 0.0031872509960159364, 'mean_word_length': 3.156456953642384, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3524720', 'n_tokens_mistral': 1346, 'n_tokens_neox': 1289, 'n_words': 422}