| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
package cache_test |
| 5 |
|
| 6 |
import ( |
| 7 |
"github.com/AzureAD/microsoft-authentication-extensions-for-go/cache" |
| 8 |
"github.com/AzureAD/microsoft-authentication-extensions-for-go/cache/accessor" |
| 9 |
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/public" |
| 10 |
) |
| 11 |
|
| 12 |
|
| 13 |
func Example() { |
| 14 |
|
| 15 |
|
| 16 |
s := "..." |
| 17 |
a, err := accessor.New(s) |
| 18 |
if err != nil { |
| 19 |
|
| 20 |
} |
| 21 |
c, err := cache.New(a, s) |
| 22 |
if err != nil { |
| 23 |
|
| 24 |
} |
| 25 |
app, err := public.New("client-id", public.WithCache(c)) |
| 26 |
if err != nil { |
| 27 |
|
| 28 |
} |
| 29 |
|
| 30 |
_ = app |
| 31 |
} |