summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/denisenkom/go-mssqldb/README.md
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-05-10 19:42:52 +0200
committerGitHub <noreply@github.com>2020-05-10 18:42:52 +0100
commit6e23a1b843a9bde7608e86cdddd3131047b2c70b (patch)
treed52adcd82ddc230ce3df38907144104370c6b079 /vendor/github.com/denisenkom/go-mssqldb/README.md
parentda5e3fa299f6cac5ee9a4b0c50062dda1e91c8e2 (diff)
downloadgitea-6e23a1b843a9bde7608e86cdddd3131047b2c70b.tar.gz
gitea-6e23a1b843a9bde7608e86cdddd3131047b2c70b.zip
[Vendor] mssqldb: 2019-11-28 -> 2020-04-28 (#11364)
update go-mssqldb 2019-11-28 (1d7a30a10f73) -> 2020-04-28 (06a60b6afbbc)
Diffstat (limited to 'vendor/github.com/denisenkom/go-mssqldb/README.md')
-rw-r--r--vendor/github.com/denisenkom/go-mssqldb/README.md22
1 files changed, 21 insertions, 1 deletions
diff --git a/vendor/github.com/denisenkom/go-mssqldb/README.md b/vendor/github.com/denisenkom/go-mssqldb/README.md
index b655176bb6..94d87fe092 100644
--- a/vendor/github.com/denisenkom/go-mssqldb/README.md
+++ b/vendor/github.com/denisenkom/go-mssqldb/README.md
@@ -18,7 +18,7 @@ Other supported formats are listed below.
### Common parameters:
-* `user id` - enter the SQL Server Authentication user id or the Windows Authentication user id in the DOMAIN\User format. On Windows, if user id is empty or missing Single-Sign-On is used.
+* `user id` - enter the SQL Server Authentication user id or the Windows Authentication user id in the DOMAIN\User format. On Windows, if user id is empty or missing Single-Sign-On is used. The user domain sensitive to the case which is defined in the connection string.
* `password`
* `database`
* `connection timeout` - in seconds (default is 0 for no timeout), set to 0 for no timeout. Recommended to set to 0 and use context to manage query and connection timeouts.
@@ -106,6 +106,26 @@ Other supported formats are listed below.
* `odbc:server=localhost;user id=sa;password={foo{bar}` // Literal `{`, password is "foo{bar"
* `odbc:server=localhost;user id=sa;password={foo}}bar}` // Escaped `} with `}}`, password is "foo}bar"
+### Azure Active Directory authentication - preview
+
+The configuration of functionality might change in the future.
+
+Azure Active Directory (AAD) access tokens are relatively short lived and need to be
+valid when a new connection is made. Authentication is supported using a callback func that
+provides a fresh and valid token using a connector:
+``` golang
+conn, err := mssql.NewAccessTokenConnector(
+ "Server=test.database.windows.net;Database=testdb",
+ tokenProvider)
+if err != nil {
+ // handle errors in DSN
+}
+db := sql.OpenDB(conn)
+```
+Where `tokenProvider` is a function that returns a fresh access token or an error. None of these statements
+actually trigger the retrieval of a token, this happens when the first statment is issued and a connection
+is created.
+
## Executing Stored Procedures
To run a stored procedure, set the query text to the procedure name: