Class SecuritySchemeImpl

  • All Implemented Interfaces:
    Serializable, org.gcube.informationsystem.base.reference.Element, org.gcube.informationsystem.base.reference.properties.PropertyElement, org.gcube.informationsystem.base.reference.SchemaMixedElement, org.gcube.informationsystem.model.reference.ModelElement, org.gcube.informationsystem.model.reference.properties.Property, GCubeProperty, SecurityScheme
    Direct Known Subclasses:
    HTTPSecuritySchemeImpl

    public class SecuritySchemeImpl
    extends GCubePropertyImpl
    implements SecurityScheme
    Implementation of SecurityScheme.
    Author:
    Luca Frosini (ISTI - CNR)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected String description
      The human-readable description of the security scheme
      protected String reference
      The specification defining the scheme
      protected String scheme
      The name of the authentication mechanism
      protected URI url
      Where the credentials are obtained or verified
      • Fields inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl

        additionalProperties, allowedAdditionalKeys, expectedType, supertypes
      • Fields inherited from interface org.gcube.informationsystem.base.reference.Element

        DATETIME_PATTERN, NAME, REDACTED, TYPE_PROPERTY, UNKNOWN_USER
      • Fields inherited from interface org.gcube.resourcemanagement.model.reference.properties.GCubeProperty

        NAME
      • Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement

        EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY
      • Fields inherited from interface org.gcube.informationsystem.model.reference.properties.Property

        NAME
    • Constructor Summary

      Constructors 
      Constructor Description
      SecuritySchemeImpl()
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getDescription()
      A human-readable description of the security scheme, e.g.
      String getReference()
      The specification defining the scheme, as cited by the registry of the extension, written as a Markdown link, e.g.
      String getScheme()
      The name of the authentication mechanism, taken from the registry of the framework the extension defines, e.g.
      URI getURL()
      Where the credentials are obtained or verified, e.g.
      void setDescription​(String description)
      Sets the human-readable description of the security scheme
      void setReference​(String reference)
      Sets the specification defining the scheme
      void setScheme​(String scheme)
      Sets the name of the authentication mechanism
      void setURL​(URI url)
      Sets where the credentials are obtained or verified
      • Methods inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl

        addAllowedAdditionalKey, getAdditionalProperties, getAdditionalProperty, getExpectedType, getSupertypes, setAdditionalProperties, setAdditionalProperty
      • Methods inherited from class org.gcube.informationsystem.base.impl.ElementImpl

        getTypeName, toString
      • Methods inherited from interface org.gcube.informationsystem.base.reference.Element

        getTypeName
      • Methods inherited from interface org.gcube.informationsystem.model.reference.ModelElement

        getExpectedType, getSupertypes
      • Methods inherited from interface org.gcube.informationsystem.model.reference.properties.Property

        getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
    • Field Detail

      • scheme

        protected String scheme
        The name of the authentication mechanism
      • reference

        protected String reference
        The specification defining the scheme
      • url

        protected URI url
        Where the credentials are obtained or verified
      • description

        protected String description
        The human-readable description of the security scheme
    • Constructor Detail

      • SecuritySchemeImpl

        public SecuritySchemeImpl()
        Default constructor
    • Method Detail

      • setScheme

        public void setScheme​(String scheme)
        Sets the name of the authentication mechanism
        Specified by:
        setScheme in interface SecurityScheme
        Parameters:
        scheme - the name of the authentication mechanism, e.g. Bearer
      • getReference

        public String getReference()
        The specification defining the scheme, as cited by the registry of the extension, written as a Markdown link, e.g. [RFC 6750](https://www.rfc-editor.org/rfc/rfc6750) or [RFC 9449, Section 7.1](https://www.rfc-editor.org/rfc/rfc9449#section-7.1); plain text when there is no link.
        Specified by:
        getReference in interface SecurityScheme
        Returns:
        the specification defining the scheme
      • setReference

        public void setReference​(String reference)
        Sets the specification defining the scheme
        Specified by:
        setReference in interface SecurityScheme
        Parameters:
        reference - the specification defining the scheme, as a Markdown link
      • getURL

        public URI getURL()
        Where the credentials are obtained or verified, e.g. the discovery document of the OpenID Connect provider issuing the tokens (OpenID Connect Discovery 1.0), such as https://accounts.d4science.org/auth/realms/d4science/.well-known/openid-configuration for the D4Science IAM, or the portal issuing API keys.
        Specified by:
        getURL in interface SecurityScheme
        Returns:
        where the credentials are obtained or verified
      • setURL

        public void setURL​(URI url)
        Sets where the credentials are obtained or verified
        Specified by:
        setURL in interface SecurityScheme
        Parameters:
        url - where the credentials are obtained or verified, e.g. the OpenID Connect discovery document of the issuer
      • getDescription

        public String getDescription()
        A human-readable description of the security scheme, e.g. Tokens issued by the D4Science IAM for the Context of the call.
        Specified by:
        getDescription in interface SecurityScheme
        Returns:
        the description
      • setDescription

        public void setDescription​(String description)
        Sets the human-readable description of the security scheme
        Specified by:
        setDescription in interface SecurityScheme
        Parameters:
        description - the description