Class OpenShiftBearerTokenCredentialImpl
java.lang.Object
com.cloudbees.plugins.credentials.BaseCredentials
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl
org.jenkinsci.plugins.kubernetes.credentials.OpenShiftBearerTokenCredentialImpl
- All Implemented Interfaces:
 com.cloudbees.plugins.credentials.common.IdCredentials,com.cloudbees.plugins.credentials.common.PasswordCredentials,com.cloudbees.plugins.credentials.common.StandardCredentials,com.cloudbees.plugins.credentials.common.StandardUsernameCredentials,com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials,com.cloudbees.plugins.credentials.common.UsernameCredentials,com.cloudbees.plugins.credentials.common.UsernamePasswordCredentials,com.cloudbees.plugins.credentials.Credentials,ExtensionPoint,Describable<com.cloudbees.plugins.credentials.Credentials>,Serializable,TokenProducer
public class OpenShiftBearerTokenCredentialImpl
extends com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl
implements TokenProducer
- Author:
 - Nicolas De Loof, Max Laverse
 
For the specification, see: https://docs.openshift.com/enterprise/3.0/architecture/additional_concepts/authentication.html#oauth
 - See Also:
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classNested classes/interfaces inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials.BaseStandardCredentialsDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
com.cloudbees.plugins.credentials.common.IdCredentials.HelpersNested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials
com.cloudbees.plugins.credentials.common.StandardCredentials.NameProviderNested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials.NameProvider - 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionOpenShiftBearerTokenCredentialImpl(com.cloudbees.plugins.credentials.CredentialsScope scope, String id, String description, String username, String password)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected static OpenShiftBearerTokenCredentialImpl.TokenextractTokenFromLocation(String location) protected static StringgetBasicAuthenticationHeader(String username, Secret password) Methods inherited from class com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl
getPassword, getUsername, isUsernameSecret, setUsernameSecretMethods inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
equals, getDescription, getId, hashCodeMethods inherited from class com.cloudbees.plugins.credentials.BaseCredentials
getDescriptor, getScopeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cloudbees.plugins.credentials.Credentials
forRun, getDescriptor, getScopeMethods inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
getIdMethods inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials
getDescription 
- 
Field Details
- 
EARLY_EXPIRE_DELAY_SEC
protected static final long EARLY_EXPIRE_DELAY_SEC- See Also:
 
 
 - 
 - 
Constructor Details
- 
OpenShiftBearerTokenCredentialImpl
@DataBoundConstructor public OpenShiftBearerTokenCredentialImpl(com.cloudbees.plugins.credentials.CredentialsScope scope, String id, String description, String username, String password) throws Descriptor.FormException - Throws:
 Descriptor.FormException
 
 - 
 - 
Method Details
- 
extractTokenFromLocation
protected static OpenShiftBearerTokenCredentialImpl.Token extractTokenFromLocation(String location) throws OpenShiftBearerTokenCredentialImpl.TokenResponseError  - 
getBasicAuthenticationHeader
 - 
getToken
public String getToken(String apiServerURL, String caCertData, boolean skipTlsVerify) throws IOException - Specified by:
 getTokenin interfaceTokenProducer- Throws:
 IOException
 
 -