Class AuthenticationAttribute
Authentication attribute for classes and method
Inherited Members
Namespace: nanoFramework.WebServer
Assembly: nanoFramework.WebServer.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method)]
public class AuthenticationAttribute : Attribute
Constructors
AuthenticationAttribute(string)
The constructor for the Authentication attribute
Declaration
public AuthenticationAttribute(string auth)
Parameters
Type | Name | Description |
---|---|---|
string | auth |
Properties
AuthenticationMethod
The authentication method, examples:
- Basic:user password
- Basic
- ApiKey:OneApiKey
- ApiKey
- None In case of Basic and ApiKey alone, the default one passed at server properties ones will be used The Basic authentication is a classical http basic authentication and the couple user password have to be separated with a space, the password can contain spaces but not the user name. Basic and the user name has to be separated with a : ApiKey and the current apikey has to be separated with : The current ApiKey can contain only characters that are allow in http headers
Declaration
public string AuthenticationMethod { get; set; }
Property Value
Type | Description |
---|---|
string |