io.helidon.integrations.oci.authentication.instance.AuthenticationMethodInstancePrincipal__ServiceDescriptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of helidon-integrations-oci-authentication-instance Show documentation
Show all versions of helidon-integrations-oci-authentication-instance Show documentation
Authentication based on Instance's principal
/*
* Copyright (c) 2024 Oracle and/or its affiliates.
*
* 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 io.helidon.integrations.oci.authentication.instance;
import java.util.List;
import java.util.Set;
import io.helidon.common.Generated;
import io.helidon.common.GenericType;
import io.helidon.common.types.TypeName;
import io.helidon.integrations.oci.OciConfig;
import io.helidon.service.registry.Dependency;
import io.helidon.service.registry.DependencyContext;
import io.helidon.service.registry.GeneratedService;
import com.oracle.bmc.auth.InstancePrincipalsAuthenticationDetailsProvider;
/**
* Service descriptor for {@link io.helidon.integrations.oci.authentication.instance.AuthenticationMethodInstancePrincipal}.
*
* @param type of the service, for extensibility
*/
@Generated(value = "io.helidon.service.codegen.ServiceExtension", trigger = "io.helidon.integrations.oci.authentication.instance.AuthenticationMethodInstancePrincipal")
public class AuthenticationMethodInstancePrincipal__ServiceDescriptor implements GeneratedService.Descriptor {
private static final TypeName TYPE_0 = TypeName.create("io.helidon.integrations.oci.OciConfig");
private static final GenericType> GTYPE_0 = new GenericType() {};
private static final TypeName TYPE_1 = TypeName.create("com.oracle.bmc.auth.InstancePrincipalsAuthenticationDetailsProvider.InstancePrincipalsAuthenticationDetailsProviderBuilder");
private static final GenericType> GTYPE_1 = new GenericType() {};
/**
* Global singleton instance for this descriptor.
*/
public static final AuthenticationMethodInstancePrincipal__ServiceDescriptor INSTANCE = new AuthenticationMethodInstancePrincipal__ServiceDescriptor<>();
private static final TypeName SERVICE_TYPE = TypeName.create("io.helidon.integrations.oci.authentication.instance.AuthenticationMethodInstancePrincipal");
private static final TypeName DESCRIPTOR_TYPE = TypeName.create("io.helidon.integrations.oci.authentication.instance.AuthenticationMethodInstancePrincipal__ServiceDescriptor");
/**
* Dependency for AuthenticationMethodInstancePrincipal(OciConfig config, InstancePrincipalsAuthenticationDetailsProvider.InstancePrincipalsAuthenticationDetailsProviderBuilder builder), parameter config.
*/
public static final Dependency PARAM_0 = Dependency.builder()
.typeName(TYPE_0)
.name("config")
.service(SERVICE_TYPE)
.descriptor(DESCRIPTOR_TYPE)
.descriptorConstant("PARAM_0")
.contract(TYPE_0)
.contractType(GTYPE_0)
.build();
/**
* Dependency for AuthenticationMethodInstancePrincipal(OciConfig config, InstancePrincipalsAuthenticationDetailsProvider.InstancePrincipalsAuthenticationDetailsProviderBuilder builder), parameter builder.
*/
public static final Dependency PARAM_1 = Dependency.builder()
.typeName(TYPE_1)
.name("builder")
.service(SERVICE_TYPE)
.descriptor(DESCRIPTOR_TYPE)
.descriptorConstant("PARAM_1")
.contract(TYPE_1)
.contractType(GTYPE_1)
.build();
private static final List DEPENDENCIES = List.of(PARAM_0, PARAM_1);
private static final Set CONTRACTS = Set.of(TypeName.create("io.helidon.integrations.oci.spi.OciAuthenticationMethod"));
/**
* Constructor with no side effects
*/
protected AuthenticationMethodInstancePrincipal__ServiceDescriptor() {
}
@Override
public TypeName serviceType() {
return SERVICE_TYPE;
}
@Override
public TypeName descriptorType() {
return DESCRIPTOR_TYPE;
}
@Override
public Set contracts() {
return CONTRACTS;
}
@Override
public List dependencies() {
return DEPENDENCIES;
}
@Override
public AuthenticationMethodInstancePrincipal instantiate(DependencyContext ctx__helidonRegistry) {
OciConfig config = ctx__helidonRegistry.dependency(PARAM_0);
InstancePrincipalsAuthenticationDetailsProvider.InstancePrincipalsAuthenticationDetailsProviderBuilder builder = ctx__helidonRegistry.dependency(PARAM_1);
return new AuthenticationMethodInstancePrincipal(config, builder);
}
@Override
public double weight() {
return 60.0;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy