S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_user.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
32#ifndef SOPC_USER_H_
33#define SOPC_USER_H_
34
35#include <stdbool.h>
36
37#include "sopc_builtintypes.h"
38
40typedef struct SOPC_User SOPC_User;
41
45bool SOPC_User_IsLocal(const SOPC_User* user);
46
51
60
69
75
78
84
90
93
95bool SOPC_User_Equal(const SOPC_User* left, const SOPC_User* right);
96
99
102
111const char* SOPC_User_ToCString(const SOPC_User* user);
112
113#endif /* SOPC_USER_H_ */
const SOPC_User * SOPC_User_GetLocal(void)
Returns a local user, which shall not be freed nor be modified.
bool SOPC_User_IsUsername(const SOPC_User *user)
Returns true if the type of the user is username.
const SOPC_String * SOPC_User_GetCertificate_Thumbprint(const SOPC_User *user)
Returns a reference to the internal storage of the thumbprint certificate (SHA1 hexadecimal format)....
bool SOPC_User_IsCertificate(const SOPC_User *user)
Returns true if the type of the user is certificate.
void SOPC_User_Free(SOPC_User **ppUser)
User deletion, should not be called on local and anonymous users.
struct SOPC_User SOPC_User
Logged in (successfully) user structure.
Definition sopc_user.h:40
const SOPC_User * SOPC_User_GetAnonymous(void)
Returns an anonymous user, which shall not be freed nor be modified.
const SOPC_ByteString * SOPC_User_GetCertificate(const SOPC_User *user)
Returns a reference to the internal storage of the DER certificate. The user shall be a user with a c...
bool SOPC_User_IsAnonymous(const SOPC_User *user)
Returns true if the user is an anonymous user.
SOPC_User * SOPC_User_CreateCertificate(SOPC_ByteString *certificateData)
Creates a SOPC_User which has a X509 certificate.
const SOPC_String * SOPC_User_GetUsername(const SOPC_User *user)
Returns a reference to the internal storage of the username. The user must be a user with a username.
bool SOPC_User_IsLocal(const SOPC_User *user)
Returns true if the user is a local user.
const char * SOPC_User_ToCString(const SOPC_User *user)
Returns the user as a const C string description:
SOPC_User * SOPC_User_Copy(const SOPC_User *user)
Copy the given user.
SOPC_User * SOPC_User_CreateUsername(SOPC_String *username)
Creates a SOPC_User which has a usename.
bool SOPC_User_Equal(const SOPC_User *left, const SOPC_User *right)
Returns true if the users are the same type and content (if applicable)
This structure provides string encapsulation.
Definition sopc_builtintypes.h:148